Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): workaround skipped jobs being considered successful #3380

Merged
merged 2 commits into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/acceptance_tests_reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
name: Acceptance Tests
needs: [ deploy_autoscaler ]
strategy:
fail-fast: false
matrix:
suite: "${{ fromJSON(inputs.suites) }}"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -97,7 +98,7 @@ jobs:
deployment_cleanup:
needs: [ deploy_autoscaler, acceptance_tests ]
if: "!contains(github.event.pull_request.labels.*.name, 'skip-cleanup')"
name: "Result"
name: Cleanup
runs-on: ubuntu-latest
container:
image: "${{ inputs.self_hosted_image }}"
Expand All @@ -114,3 +115,17 @@ jobs:
- name: Perform deployment cleanup
run: |
make --directory="${AUTOSCALER_DIR}" deploy-cleanup

# This job will run and fail if any of the jobs it depends on fail or are cancelled.
# It is an "ugly workaround" for an issue on GitHub Actions side, where
# skipped jobs are considered successful.
# See https://github.com/actions/runner/issues/2566#issuecomment-1523814835
result:
needs: acceptance_tests
if: ${{ cancelled() || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'failure') }}
name: Result
runs-on: ubuntu-latest
steps:
- run: |
echo "Some required workflows have failed!"
exit 1
Loading