From b1a8c88c694a99bdb41b9f8b297b7e727b568f0c Mon Sep 17 00:00:00 2001 From: Illia Karenhin Date: Tue, 12 Nov 2024 22:20:50 +0700 Subject: [PATCH] fix(ci): added job for required status check --- .github/workflows/ci.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3ff190a..a06eb5d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: "Rust CI" +name: "CI" on: pull_request: paths: @@ -50,3 +50,18 @@ jobs: - name: Run tests run: cargo nextest run --no-fail-fast + + ci-success: + name: Github Status Check + runs-on: ubuntu-latest + if: always() && !cancelled() + needs: [ build ] + steps: + - name: Status + run: | + # This will check all jobs status in the `needs` list, and fail job if one is failed. + # Since we split prover and core to different flows, this job will be only as Required Status Check in the Pull Request. + if [[ ${{ contains(join(needs.*.result, ','), 'failure') }} == "true" ]]; then + echo "Intentionally failing to block PR from merging" + exit 1 + fi