ci: fixup bis (#28566) (#28568)

* ci: ensure new success checks fail when they should
This commit is contained in:
David Arnold 2024-11-25 17:43:50 +01:00 committed by GitHub
parent 4c5ecfa9e2
commit 08ef9df94c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 46 additions and 8 deletions

View file

@ -121,11 +121,24 @@ jobs:
cat $f
done
# TIP: Use these for checks, e.g. Server / Migration / Success
# TIP: Use these for checks, e.g. Migration / Success
success:
name: Success
needs: [migration-test]
if: always()
runs-on: ubuntu-latest
steps:
- name: Passed
run: "echo Skipped"
- name: Migration '${{ needs.migration-test.result }}'
shell: python
run: |
stati = [
'${{ needs.migration-test.result }}',
]
nopass = ["failure", "cancelled"]
dopass = ["success", "skipped"]
if any(r in nopass for r in stati):
exit(1)
if all(r in dopass for r in stati):
exit(0)
exit(1)

View file

@ -37,7 +37,6 @@ jobs:
run: |
echo "Evolution towards a set of (fast) unit tests which run without a DB connection is being planned"
gen-idx-integration:
needs: unit-test
name: Gen Integration Test Matrix
runs-on: ubuntu-latest
outputs:
@ -164,8 +163,22 @@ jobs:
success:
name: Success
needs: [unit-test, integration-test]
if: always()
runs-on: ubuntu-latest
steps:
- name: Passed
run: "echo Skipped"
- name: Unit '${{ needs.unit-test.result }}' / Integration '${{ needs.integration-test.result }}'
shell: python
run: |
stati = [
'${{ needs.unit-test.result }}',
'${{ needs.integration-test.result }}',
]
nopass = ["failure", "cancelled"]
dopass = ["success", "skipped"]
if any(r in nopass for r in stati):
exit(1)
if all(r in dopass for r in stati):
exit(0)
exit(1)

View file

@ -151,8 +151,20 @@ jobs:
success:
name: Success
needs: [ui-test]
if: always()
runs-on: ubuntu-latest
steps:
- name: Passed
run: "echo Skipped"
- name: UI Test '${{ needs.ui-test.result }}'
shell: python
run: |
stati = [
'${{ needs.ui-test.result }}',
]
nopass = ["failure", "cancelled"]
dopass = ["success", "skipped"]
if any(r in nopass for r in stati):
exit(1)
if all(r in dopass for r in stati):
exit(0)
exit(1)