diff --git a/.github/workflows/org-quality-gate.yml b/.github/workflows/org-quality-gate.yml index f4b00e7..b74469a 100644 --- a/.github/workflows/org-quality-gate.yml +++ b/.github/workflows/org-quality-gate.yml @@ -15,8 +15,8 @@ permissions: jobs: quality-gate: name: quality-gate - uses: agiletec-inc/github-actions/.github/workflows/quality-gate.yml@0a4e9e230b3da52a40a0fe4ab0ae6f6f6971574b + uses: agiletec-inc/github-actions/.github/workflows/quality-gate.yml@f6d083035f7501b3385790f95c9f344cab1038e3 with: - source-ref: 0a4e9e230b3da52a40a0fe4ab0ae6f6f6971574b + source-ref: f6d083035f7501b3385790f95c9f344cab1038e3 linux-runs-on: ${{ github.event.repository.private && 'org-shared-ci-light' || 'ubuntu-latest' }} swift-runs-on: macos-latest diff --git a/.github/workflows/quality-gate.yml b/.github/workflows/quality-gate.yml index 0c20e36..10b634f 100644 --- a/.github/workflows/quality-gate.yml +++ b/.github/workflows/quality-gate.yml @@ -232,10 +232,10 @@ jobs: fetch_status=$? if [ "$fetch_status" -eq 0 ]; then - CHECK_RUNS="$CHECK_RUNS" node .quality-gate-source/.github/scripts/evaluate_required_checks.mjs - evaluation_status=$? - if [ "$evaluation_status" -eq 0 ]; then + if CHECK_RUNS="$CHECK_RUNS" node .quality-gate-source/.github/scripts/evaluate_required_checks.mjs; then exit 0 + else + evaluation_status=$? fi if [ "$evaluation_status" -ne 75 ]; then exit "$evaluation_status" diff --git a/tests/test_workflow_wiring.py b/tests/test_workflow_wiring.py index 956ed90..9385196 100644 --- a/tests/test_workflow_wiring.py +++ b/tests/test_workflow_wiring.py @@ -58,6 +58,14 @@ def test_ci_discovers_all_contract_test_modules(self) -> None: self.assertRegex(source, r"python3\s+-m\s+unittest\s+discover(?:\s|$)") self.assertNotRegex(source, r"python3\s+-m\s+unittest\s+tests\.test_") + def test_native_gate_pending_status_is_captured_under_errexit(self) -> None: + source = QUALITY_GATE.read_text() + self.assertIn( + 'if CHECK_RUNS="$CHECK_RUNS" node ' + '.quality-gate-source/.github/scripts/evaluate_required_checks.mjs; then', + source, + ) + if __name__ == "__main__": unittest.main()