Skip to content
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
46 changes: 44 additions & 2 deletions .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,17 @@ jobs:
uv run --all-extras aignostics application list
uv run --all-extras aignostics application run list --verbose --limit 1

# All test steps use continue-on-error: true so that every test suite
# always runs regardless of whether earlier suites failed. This ensures
# Codecov always receives a complete coverage report (partial reports
# cause the coverage badge to read lower than the true value).
# A single "Assert no test failures" gate step at the end surfaces any
# failures and fails the job — so the workflow still fails correctly.
Comment thread
olivermeyer marked this conversation as resolved.

- name: Test / Unit (multiple Python versions)
id: unit
continue-on-error: true
if: ${{ !cancelled() }}
uses: ./.github/actions/run-tests
with:
test-type: unit
Expand All @@ -168,6 +178,9 @@ jobs:
commit-message: ${{ inputs.commit_message }}

- name: Test / Integration (multiple Python versions)
id: integration
continue-on-error: true
if: ${{ !cancelled() }}
uses: ./.github/actions/run-tests
with:
test-type: integration
Expand All @@ -177,6 +190,9 @@ jobs:
commit-message: ${{ inputs.commit_message }}

- name: Test / E2E / regular (multiple Python versions)
id: e2e
continue-on-error: true
if: ${{ !cancelled() }}
uses: ./.github/actions/run-tests
with:
test-type: e2e
Expand All @@ -186,6 +202,9 @@ jobs:
commit-message: ${{ inputs.commit_message }}

- name: Test / E2E / long running (single Python version)
id: long_running
continue-on-error: true
if: ${{ !cancelled() }}
uses: ./.github/actions/run-tests
with:
test-type: long-running
Expand All @@ -195,9 +214,13 @@ jobs:
commit-message: ${{ inputs.commit_message }}

- name: Test / E2E / very long running (single Python version)
id: very_long_running
continue-on-error: true
if: |
contains(inputs.commit_message, 'enable:test:very_long_running') ||
contains(github.event.pull_request.labels.*.name, 'enable:test:very_long_running')
!cancelled() && (
contains(inputs.commit_message, 'enable:test:very_long_running') ||
contains(github.event.pull_request.labels.*.name, 'enable:test:very_long_running')
)
uses: ./.github/actions/run-tests
with:
test-type: very-long-running
Expand Down Expand Up @@ -247,3 +270,22 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Assert no test failures
# Single gate that fails the job if any test suite failed. Kept last so
# that all reporting steps (Codecov, SonarQube, artifact upload) always
# run to completion before the job is marked as failed.
if: ${{ !cancelled() }}
shell: bash
run: |
failed=()
[[ "${{ steps.unit.outcome }}" == "failure" ]] && failed+=("unit")
[[ "${{ steps.integration.outcome }}" == "failure" ]] && failed+=("integration")
[[ "${{ steps.e2e.outcome }}" == "failure" ]] && failed+=("e2e")
[[ "${{ steps.long_running.outcome }}" == "failure" ]] && failed+=("long-running")
[[ "${{ steps.very_long_running.outcome }}" == "failure" ]] && failed+=("very-long-running")
Comment thread
olivermeyer marked this conversation as resolved.
if [[ ${#failed[@]} -gt 0 ]]; then
echo "The following test suites failed: ${failed[*]}"
exit 1
fi
echo "All test suites passed."
Comment thread
olivermeyer marked this conversation as resolved.
Loading