Skip to content

Commit 361d463

Browse files
committed
[ci] Make coverage/lint/sanitize wait for tests to pass
1 parent e637e0e commit 361d463

2 files changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,24 @@
55

66
name: coverage
77

8+
run-name: "${{ github.event.workflow_run.head_commit.message }}"
9+
810
on:
9-
push:
10-
branches: [ main, feature/** ]
11-
pull_request:
12-
types: [opened, synchronize, reopened]
13-
workflow_dispatch:
11+
workflow_run:
12+
workflows: [test]
13+
types: [completed]
1414

1515
jobs:
1616
coverage:
1717
name: ubuntu-24.04 / llvm-cov
1818
runs-on: ubuntu-24.04
1919
timeout-minutes: 6
20+
if: github.event.workflow_run.conclusion == 'success'
2021

2122
steps:
2223
- uses: actions/checkout@v5
24+
with:
25+
ref: ${{ github.event.workflow_run.head_sha }}
2326

2427
- name: Install CMake
2528
uses: lukka/get-cmake@latest
@@ -104,9 +107,12 @@ jobs:
104107
name: ubuntu-24.04 / gcov
105108
runs-on: ubuntu-24.04
106109
timeout-minutes: 6
110+
if: github.event.workflow_run.conclusion == 'success'
107111

108112
steps:
109113
- uses: actions/checkout@v5
114+
with:
115+
ref: ${{ github.event.workflow_run.head_sha }}
110116

111117
- name: Install CMake
112118
uses: lukka/get-cmake@latest

.github/workflows/sanitize.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,24 @@
88

99
name: sanitize
1010

11+
run-name: "${{ github.event.workflow_run.head_commit.message }}"
12+
1113
on:
12-
push:
13-
branches: [ main, feature/** ]
14-
pull_request:
15-
types: [opened, synchronize, reopened]
14+
workflow_run:
15+
workflows: [test]
16+
types: [completed]
1617

1718
jobs:
1819
asan:
1920
name: ubuntu-24.04 / ASan + UBSan
2021
runs-on: ubuntu-24.04
2122
timeout-minutes: 10
23+
if: github.event.workflow_run.conclusion == 'success'
2224

2325
steps:
2426
- uses: actions/checkout@v5
27+
with:
28+
ref: ${{ github.event.workflow_run.head_sha }}
2529

2630
- name: Install CMake
2731
uses: lukka/get-cmake@latest

0 commit comments

Comments
 (0)