Merge pull request #6183 from roc-lang/required-checks-fix

fix required checks passing when job skipped
This commit is contained in:
Anton-4 2023-12-05 17:57:04 +01:00 committed by GitHub
commit 263f9ceb41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ jobs:
start-macos-x86-64-tests:
needs: check-changes
if: needs.check-changes.outputs.run_tests == 'full'
uses: ./.github/workflows/ubuntu_x86_64.yml
uses: ./.github/workflows/macos_x86_64.yml
start-ubuntu-x86-64-tests:
needs: check-changes
@ -103,12 +103,16 @@ jobs:
needs: [ran-full, ran-none]
if: |
always()
&& contains(needs.*.result, 'success')
&& !contains(needs.*.result, 'failure')
&& !contains(needs.*.result, 'cancelled')
&& !(needs.ran-full.result == 'skipped' && needs.ran-none.result == 'skipped')
steps:
- run: echo "Workflow succeeded :)"
- name: Check previous job results
run: |
if [ "${{ needs.ran-full.result }}" != "success" ] && [ "${{ needs.ran-none.result }}" != "success" ]; then
echo "One or more jobs failed."
exit 1
fi
- run: echo "Workflow succeeded :)"