Add CI success verification step to workflows
- Introduced a new job `ci-success` in both Gitea and GitHub CI workflows to verify that all previous jobs (lint and test) succeeded. - The job runs on `ubuntu-latest` and exits with a failure status if any prior job has failed or been cancelled, enhancing the reliability of the CI process.
This commit is contained in:
@@ -38,3 +38,12 @@ jobs:
|
|||||||
run: uv sync --group dev
|
run: uv sync --group dev
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: uv run pytest -q
|
run: uv run pytest -q
|
||||||
|
|
||||||
|
ci-success:
|
||||||
|
if: always()
|
||||||
|
needs: [lint, test]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Verify all jobs succeeded
|
||||||
|
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
|
||||||
|
run: exit 1
|
||||||
|
|||||||
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@@ -36,3 +36,12 @@ jobs:
|
|||||||
run: uv sync --group dev
|
run: uv sync --group dev
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: uv run pytest -q
|
run: uv run pytest -q
|
||||||
|
|
||||||
|
ci-success:
|
||||||
|
if: always()
|
||||||
|
needs: [lint, test]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Verify all jobs succeeded
|
||||||
|
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
|
||||||
|
run: exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user