Skip to content

Commit 9bb8fd7

Browse files
committed
ci: do not run live integration on tag pushes
A commit and its release tag are pushed together, which fires two integration runs at once. Both submit an identical backtest that the backend deduplicates to the same job, so the runs race for its result and one receives an empty Completed envelope, reddening the tag build and skipping the release job. The tagged commit already ran integration on its branch push, so gate integration on github.ref_type != tag. Adjust the release job to tolerate the now-skipped integration (run when unit passed and integration did not fail).
1 parent 0b3f00b commit 9bb8fd7

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ jobs:
2727
needs: unit
2828
runs-on: ubuntu-latest
2929
environment: Preproduction
30-
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
30+
# Do not run on tag pushes. The tagged commit already ran integration on its
31+
# branch push; a second concurrent run submits an identical backtest that the
32+
# backend deduplicates to the same job, so the two runs race for its result and
33+
# the loser receives an empty Completed envelope. Branch pushes and PRs still gate.
34+
if: >-
35+
github.ref_type != 'tag' &&
36+
(github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push')
3137
steps:
3238
- uses: actions/checkout@v4
3339
- uses: actions/setup-java@v4
@@ -50,7 +56,13 @@ jobs:
5056
release:
5157
needs: [unit, integration]
5258
runs-on: ubuntu-latest
53-
if: startsWith(github.ref, 'refs/tags/')
59+
# integration is skipped on tag pushes (see above), so gate on it not having
60+
# failed rather than requiring success.
61+
if: >-
62+
always() &&
63+
startsWith(github.ref, 'refs/tags/') &&
64+
needs.unit.result == 'success' &&
65+
needs.integration.result != 'failure'
5466
permissions:
5567
contents: write
5668
steps:

0 commit comments

Comments
 (0)