diff --git a/.github/workflows/pr-database-tests.yml b/.github/workflows/pr-database-tests.yml index c216218aec..e06072b61e 100644 --- a/.github/workflows/pr-database-tests.yml +++ b/.github/workflows/pr-database-tests.yml @@ -84,3 +84,17 @@ jobs: - name: Run Database Tests working-directory: ./backend run: pytest tests/integration/tests/migrations/ + + # Keeps the pull request in the merge queue while RunsOn reruns database-tests + # after an EC2 Spot interruption. The gate fails when database-tests fails for + # any other reason. Require "database-tests-gate / pass" in the main ruleset, + # not "database-tests". + database-tests-gate: + if: ${{ always() && needs.changes.outputs.db == 'true' }} + needs: [changes, database-tests] + permissions: + actions: read + checks: read + uses: runs-on/spot-retry-gate/.github/workflows/merge-queue.yml@451eea7c3d2c58d14a1f80f0bbb99eaa347b9471 # ratchet:runs-on/spot-retry-gate/.github/workflows/merge-queue.yml@v1.0.0 + with: + job_results: ${{ toJSON(needs) }} diff --git a/.github/workflows/pr-python-checks.yml b/.github/workflows/pr-python-checks.yml index 0733cf7a55..b5c9a1cc2f 100644 --- a/.github/workflows/pr-python-checks.yml +++ b/.github/workflows/pr-python-checks.yml @@ -78,3 +78,17 @@ jobs: env: TERM: xterm-256color run: ty check --output-format github + + # Keeps the pull request in the merge queue while RunsOn reruns mypy-check + # after an EC2 Spot interruption. The gate fails when mypy-check fails for any + # other reason. Require "mypy-check-gate / pass" in the main ruleset, not + # "mypy-check". + mypy-check-gate: + if: ${{ always() && needs.changes.outputs.python == 'true' }} + needs: [changes, mypy-check] + permissions: + actions: read + checks: read + uses: runs-on/spot-retry-gate/.github/workflows/merge-queue.yml@451eea7c3d2c58d14a1f80f0bbb99eaa347b9471 # ratchet:runs-on/spot-retry-gate/.github/workflows/merge-queue.yml@v1.0.0 + with: + job_results: ${{ toJSON(needs) }} diff --git a/.github/workflows/pr-python-tests.yml b/.github/workflows/pr-python-tests.yml index d56f104583..46fe46968e 100644 --- a/.github/workflows/pr-python-tests.yml +++ b/.github/workflows/pr-python-tests.yml @@ -79,3 +79,17 @@ jobs: - name: Run Tests shell: script -q -e -c "bash --noprofile --norc -eo pipefail {0}" run: py.test -o junit_family=xunit2 -v -n auto backend/tests/unit + + # Keeps the pull request in the merge queue while RunsOn reruns backend-check + # after an EC2 Spot interruption. The gate fails when backend-check fails for + # any other reason. Require "backend-check-gate / pass" in the main ruleset, + # not "backend-check". + backend-check-gate: + if: ${{ always() && needs.changes.outputs.python == 'true' }} + needs: [changes, backend-check] + permissions: + actions: read + checks: read + uses: runs-on/spot-retry-gate/.github/workflows/merge-queue.yml@451eea7c3d2c58d14a1f80f0bbb99eaa347b9471 # ratchet:runs-on/spot-retry-gate/.github/workflows/merge-queue.yml@v1.0.0 + with: + job_results: ${{ toJSON(needs) }}