mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
ci: rerun integration tests on failure (#6141)
This commit is contained in:
parent
49fea7d03e
commit
362ddc657b
3 changed files with 44 additions and 0 deletions
|
@ -78,3 +78,16 @@ jobs:
|
||||||
test-target: ${{ matrix.target }}
|
test-target: ${{ matrix.target }}
|
||||||
db-alteration-target: ${{ github.head_ref }}
|
db-alteration-target: ${{ github.head_ref }}
|
||||||
pnpm-version: 9
|
pnpm-version: 9
|
||||||
|
|
||||||
|
# Automatically rerun the workflow since the integration tests are moody
|
||||||
|
# From this genius: https://github.com/orgs/community/discussions/67654#discussioncomment-8038649
|
||||||
|
rerun-on-failure:
|
||||||
|
needs: run-logto
|
||||||
|
if: failure() && fromJSON(github.run_attempt) < 3
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- env:
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
GH_DEBUG: api
|
||||||
|
run: gh workflow run rerun.yml -F run_id=${{ github.run_id }}
|
||||||
|
|
13
.github/workflows/integration-test.yml
vendored
13
.github/workflows/integration-test.yml
vendored
|
@ -47,3 +47,16 @@ jobs:
|
||||||
logto-artifact: integration-test-${{ github.sha }}-dev-features-${{ env.DEV_FEATURES_ENABLED }}
|
logto-artifact: integration-test-${{ github.sha }}-dev-features-${{ env.DEV_FEATURES_ENABLED }}
|
||||||
test-target: ${{ matrix.target }}
|
test-target: ${{ matrix.target }}
|
||||||
pnpm-version: 9
|
pnpm-version: 9
|
||||||
|
|
||||||
|
# Automatically rerun the workflow since the integration tests are moody
|
||||||
|
# From this genius: https://github.com/orgs/community/discussions/67654#discussioncomment-8038649
|
||||||
|
rerun-on-failure:
|
||||||
|
needs: run-logto
|
||||||
|
if: failure() && fromJSON(github.run_attempt) < 3
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- env:
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
GH_DEBUG: api
|
||||||
|
run: gh workflow run rerun.yml -F run_id=${{ github.run_id }}
|
||||||
|
|
18
.github/workflows/rerun.yml
vendored
Normal file
18
.github/workflows/rerun.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# From this genius: https://github.com/orgs/community/discussions/67654#discussioncomment-8038649
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
run_id:
|
||||||
|
required: true
|
||||||
|
jobs:
|
||||||
|
rerun:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: rerun ${{ inputs.run_id }}
|
||||||
|
env:
|
||||||
|
GH_REPO: ${{ github.repository }}
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
GH_DEBUG: api
|
||||||
|
run: |
|
||||||
|
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1
|
||||||
|
gh run rerun ${{ inputs.run_id }} --failed
|
Loading…
Reference in a new issue