diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 85f4852..8f5840d 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -4,6 +4,7 @@ name: Build and Test on: + merge_group: push: branches: [main] pull_request: @@ -19,3 +20,16 @@ jobs: uses: ShipSoft/.github/.github/workflows/pixi-cmake-build.yml@main with: tasks: '["test"]' + + all-checks: + name: All checks passed + if: always() + runs-on: ubuntu-latest + needs: [build-and-test] + steps: + - name: Check status of all jobs + run: | + if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then + echo "One or more jobs failed or were cancelled" + exit 1 + fi diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 650a9d3..d83aeaa 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,7 @@ name: Lint on: + merge_group: push: branches: [main] pull_request: @@ -19,3 +20,16 @@ jobs: contents: read pull-requests: write uses: ShipSoft/.github/.github/workflows/commit-check.yml@main + + all-checks: + name: Lint passed + if: always() + runs-on: ubuntu-latest + needs: [prek, commit-check] + steps: + - name: Check status of all jobs + run: | + if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then + echo "One or more jobs failed or were cancelled" + exit 1 + fi