diff --git a/.github/workflows/pathogen-repo-ci.yaml b/.github/workflows/pathogen-repo-ci.yaml index 849c056..406c753 100644 --- a/.github/workflows/pathogen-repo-ci.yaml +++ b/.github/workflows/pathogen-repo-ci.yaml @@ -255,6 +255,7 @@ jobs: runtime: ${{ matrix.runtime }} - name: Run ingest + id: ingest uses: ./.git/nextstrain/.github/actions/run-nextstrain-ci-build with: directory: ingest @@ -262,6 +263,7 @@ jobs: artifact-name: ${{ inputs.artifact-name }} - name: Run phylogenetic + id: phylogenetic uses: ./.git/nextstrain/.github/actions/run-nextstrain-ci-build with: directory: phylogenetic @@ -269,8 +271,20 @@ jobs: artifact-name: ${{ inputs.artifact-name }} - name: Run nextclade + id: nextclade uses: ./.git/nextstrain/.github/actions/run-nextstrain-ci-build with: directory: nextclade runtime: ${{ matrix.runtime }} artifact-name: ${{ inputs.artifact-name }} + + - name: Verify a workflow ran + continue-on-error: false + run: | + # shellcheck disable=SC2242 + + # if we see at least one success, we're good + echo "INGEST ATTEMPTED=${{ steps.ingest.outputs.run-attempted }}" + echo "PHYLOGENETIC ATTEMPTED=${{ steps.phylogenetic.outputs.run-attempted }}" + echo "NEXTCLADE ATTEMPTED=${{ steps.nextclade.outputs.run-attempted }}" + exit ${{ contains(steps.*.outputs.run-attempted, 'true') && '0' || '1' }} diff --git a/actions/run-nextstrain-ci-build/action.yaml b/actions/run-nextstrain-ci-build/action.yaml index ecb8c73..2f4a1bb 100644 --- a/actions/run-nextstrain-ci-build/action.yaml +++ b/actions/run-nextstrain-ci-build/action.yaml @@ -26,6 +26,15 @@ inputs: type: string required: true +outputs: + run-attempted: + description: >- + Boolean indicating if the build step was _attempted_. + + N.b., this does not indicate if the build step *succeeded*, only + that the requirements were met to attempt to run it. + value: ${{ steps.run-build.outputs.run-attempted }} + runs: using: "composite" steps: @@ -34,9 +43,13 @@ runs: DIR: ${{ inputs.directory }} run: | if [[ -f "$DIR"/Snakefile && -f "$DIR"/build-configs/ci/config.yaml ]]; then + echo "run-attempted=true" >> "$GITHUB_OUTPUT" + nextstrain check-setup ${{ inputs.runtime }} --set-default nextstrain build "$DIR" --configfile build-configs/ci/config.yaml else + echo "run-attempted=false" >> "$GITHUB_OUTPUT" + echo "Skipping $DIR build due to one or more missing files." for i in "$DIR"/Snakefile "$DIR"/build-configs/ci/config.yaml; do [[ -f $i ]] || echo missing "$i"