Skip to content

Commit 8ad9239

Browse files
committed
Use YAML anchors and aliases to reduce workflow repetition
1 parent b949f01 commit 8ad9239

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/long-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions: read-all
1515

1616
jobs:
1717
long-asan:
18-
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-long-test') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}}
18+
if: &check_trigger_conditions ${{ contains(github.event.pull_request.labels.*.name, 'run-long-test') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}}
1919
name: "ASAN"
2020
runs-on:
2121
[
@@ -75,7 +75,7 @@ jobs:
7575
if-no-files-found: ignore
7676

7777
long-tsan:
78-
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-long-test') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}}
78+
if: *check_trigger_conditions
7979
name: "TSAN"
8080
runs-on:
8181
[
@@ -138,7 +138,7 @@ jobs:
138138
# - Sanitizer builds may slightly differ.
139139
# - Test durations may also differ, which is important for -L "suite" because they have fixed timeouts.
140140
long-e2e-debug:
141-
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-long-test') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}}
141+
if: *check_trigger_conditions
142142
name: Long e2e - Debug
143143
runs-on:
144144
[
@@ -201,7 +201,7 @@ jobs:
201201

202202
# All e2e tests in release mode (same as release build).
203203
long-e2e-release:
204-
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-long-test') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}}
204+
if: *check_trigger_conditions
205205
name: Long e2e - Release
206206
runs-on:
207207
[
@@ -265,7 +265,7 @@ jobs:
265265
# - Long LTS tests
266266
# - Ensure snmalloc linkage
267267
e2e-long-combined:
268-
if: ${{ contains(github.event.pull_request.labels.*.name, 'run-long-test') || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'}}
268+
if: *check_trigger_conditions
269269
name: Long Shuffled/LTS/Snmalloc
270270
runs-on:
271271
[

0 commit comments

Comments
 (0)