Skip to content

Commit

Permalink
ci: fix mergify matrix integration tests (#8267)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman authored Aug 29, 2023
2 parents d5a33e9 + 3e0bc6c commit eb2d030
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 33 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:
- converted_to_draft
- ready_for_review
- labeled
- unlabeled
- auto_merge_enabled
- auto_merge_disabled
merge_group:
Expand All @@ -43,6 +44,9 @@ jobs:
fail-fast: false
matrix:
cli: [link-cli, local-npm]
# Mark a failure of `local-npm` as a successful result
# TODO: remove when `local-npm` job is fixed
continue-on-error: ${{ matrix.cli == 'local-npm' }}
timeout-minutes: 40
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -269,6 +273,8 @@ jobs:
strategy:
matrix:
bootstrap-version: ['test', 'main']
# Uncomment to mark a failure of the `test` bootstrap job as a successful result
# continue-on-error: ${{ matrix.bootstrap-version == 'test' }}
steps:
- name: free up disk space
run: |
Expand Down Expand Up @@ -311,3 +317,22 @@ jobs:
timeout-minutes: 4
with:
datadog-token: ${{ secrets.DATADOG_API_KEY }}

integration-test-result:
needs:
- pre_check
- getting-started
- deployment-test
- test-docker-build
if: needs.pre_check.outputs.should_run == 'true' && (success() || failure() || cancelled())
runs-on: ubuntu-latest
steps:
- name: Check job results
shell: bash
run: |
cat <<EOF
needs ${{ toJSON(needs) }}
EOF
[ "${{ needs.getting-started.result }}" = "success" ] || exit 1
[ "${{ needs.deployment-test.result }}" = "success" ] || exit 1
[ "${{ needs.test-docker-build.result }}" = "success" ] || exit 1
1 change: 1 addition & 0 deletions .github/workflows/mergify-ready.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- converted_to_draft
- ready_for_review
- labeled
- unlabeled
- auto_merge_enabled
- auto_merge_disabled
merge_group:
Expand Down
37 changes: 4 additions & 33 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,17 @@ queue_rules:
- base=master
# Require integration tests before merging only
- or:
- label=bypass:integration
- check-failure!=Integration tests
- or:
- label=bypass:integration
- check-success=deployment-test
- check-neutral=deployment-test
- check-skipped=deployment-test
- or:
- label=bypass:integration
- check-failure!=test-docker-build (main)
- or:
- label=bypass:integration
- check-skipped=test-docker-build
- check-success=test-docker-build (main)
- check-neutral=test-docker-build (main)
- check-skipped=test-docker-build (main)
- or:
- label=bypass:integration
- check-failure!=getting-started (link-cli)
- or:
- label=bypass:integration
- check-skipped=getting-started
- check-success=getting-started (link-cli)
- check-neutral=getting-started (link-cli)
- check-skipped=getting-started (link-cli)
# FIXME: Enable this section to validate NPM deploys...
#- or:
# - label=bypass:integration
# - check-skipped=getting-started
# - check-success=getting-started (local-npm)
# - check-neutral=getting-started (local-npm)
# - check-skipped=getting-started (local-npm)
- check-success=integration-test-result
- check-neutral=integration-test-result
- check-skipped=integration-test-result

pull_request_rules:
- name: merge to master
conditions:
- base=master
- label=automerge:no-update
- or:
- "#commits-behind=0"
- '#commits-behind=0'
- label=bypass:linear-history
- or:
- check-success=wait-integration-pre-checks
Expand Down

0 comments on commit eb2d030

Please sign in to comment.