From 3cfbbba76ea254a8287b028fe33a0d380edef4fc Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Mon, 22 Jul 2024 10:41:53 -0700 Subject: [PATCH] CI: Update test-pathogen-repo-ci Add comments to clearly show the job using pathogen-repo-ci@v0 is for pathogen repos that do not conform to the standard pathogen repo structure. Since these are tied to a old tag of the `pathogen-repo-ci`, the job should not be expected to be updated. Any new pathogen repos should be added to the `test-pathogen-repo-ci` job which uses the latest version of `pathogen-repo-ci`. --- .github/workflows/ci.yml | 45 +++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ab5916..16c2487 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -199,7 +199,11 @@ jobs: ./devel/copy-images -i ghcr.io -o docker.io -t ${{ needs.build.outputs.tag }} -l # Run pathogen repo CI builds with the final image - test-pathogen-repo-ci: + # This is running pathogen-repo-ci@v0 for pathogen repos that do not conform + # to the standard pathogen repo structure and is not expected to be updated. + # Any new pathogen repos should be added to the job using the latest version + # of the pathogen-repo-ci below. + test-pathogen-repo-ci-v0: # Only one of push-{branch,build} runs for any given workflow run, and # we're ok with either of them. needs: [build, push-branch, push-build] @@ -208,7 +212,6 @@ jobs: || needs.push-branch.result == 'success' || needs.push-build.result == 'success' strategy: - # XXX TODO: Test on multiple platforms via the matrix too, as above? matrix: include: - { pathogen: avian-flu, build-args: test_target } @@ -219,12 +222,7 @@ jobs: - { pathogen: rsv } - { pathogen: seasonal-flu, build-args: --configfile profiles/ci/builds.yaml -p } - # Disable some pathogens that do not conform to pathogen-repo-ci@v0 - # TODO: Consider adding a separate job that uses pathogen-repo-ci@v1 for these pathogens - # - { pathogen: mpox } - # - { pathogen: zika } - - name: test-pathogen-repo-ci (${{ matrix.pathogen }}) + name: test-pathogen-repo-ci-v0 (${{ matrix.pathogen }}) uses: nextstrain/.github/.github/workflows/pathogen-repo-ci.yaml@v0 with: repo: nextstrain/${{ matrix.pathogen }} @@ -237,6 +235,37 @@ jobs: continue-on-error: true secrets: inherit + # Run pathogen repo CI builds with the final image + # This is running pathogen-repo-ci@master for pathogen repos that _do_ follow + # standard pathogen repo structure and new pathogens should be added here + # to be supported for future updates such as testing on multiple platforms. + test-pathogen-repo-ci: + # Only one of push-{branch,build} runs for any given workflow run, and + # we're ok with either of them. + needs: [build, push-branch, push-build] + if: |2 + success() + || needs.push-branch.result == 'success' + || needs.push-build.result == 'success' + strategy: + # XXX TODO: Test on multiple platforms via the matrix too, as above? + matrix: + pathogen: + - mpox + - zika + + name: test-pathogen-repo-ci (${{ matrix.pathogen }}) + uses: nextstrain/.github/.github/workflows/pathogen-repo-ci.yaml@master + with: + repo: nextstrain/${{ matrix.pathogen }} + runtimes: | + - docker + env: | + NEXTSTRAIN_DOCKER_IMAGE: nextstrain/base:${{ needs.build.outputs.tag }} + artifact-name: ${{ matrix.pathogen }}-outputs + continue-on-error: true + secrets: inherit + # Delete the builder and final images from GitHub Container Registry. cleanup-registry: if: always()