Skip to content

Commit 653e89d

Browse files
committed
only do coverage steps if repo has codecov token
1 parent 051fec9 commit 653e89d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ jobs:
7070

7171

7272
test:
73+
needs: [checks]
7374
name: test ${{ matrix.os }} rust ${{ matrix.rustc || 'stable' }} ${{ matrix.extra_desc }}
7475
runs-on: ${{ matrix.os }}
7576
continue-on-error: ${{ matrix.allow_failure || false }}
@@ -83,40 +84,49 @@ jobs:
8384
rustc: "1.75.0"
8485
extra_desc: dist-tests
8586
extra_args: --no-default-features --features=dist-tests test_dist_ -- --test-threads 1
87+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
8688
- os: ubuntu-22.04
8789
rustc: stable
8890
extra_desc: dist-server
8991
extra_args: --features=dist-server
92+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
9093
- os: ubuntu-22.04
9194
rustc: stable
95+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
9296
- os: ubuntu-22.04
9397
rustc: beta
98+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
9499
- os: ubuntu-22.04
95100
rustc: nightly
96101
allow_failure: true
97102
extra_args: --features=unstable
103+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
98104
- os: ubuntu-22.04
99105
extra_desc: no-default-features
100106
extra_args: --no-default-features
101107
allow_failure: true
102108
- os: ubuntu-22.04
103109
cuda: "11.8"
104110
extra_desc: cuda11.8
111+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
105112
- os: ubuntu-24.04
106113
cuda: "12.8"
107114
# Oldest supported version, keep in sync with README.md
108115
rustc: "1.75.0"
109116
extra_desc: cuda12.8
117+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
110118
- os: macos-13
111119
no_coverage: true
112120
# # M1 CPU
113121
- os: macos-14
122+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
114123
- os: windows-2019
115124
cuda: "11.8"
116125
# Oldest supported version, keep in sync with README.md
117126
rustc: "1.75.0"
118127
extra_args: --no-fail-fast
119128
extra_desc: cuda11.8
129+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
120130
- os: windows-2019
121131
cuda: "11.8"
122132
rustc: nightly
@@ -128,18 +138,21 @@ jobs:
128138
cuda: "11.8"
129139
rustc: beta
130140
extra_desc: cuda11.8
141+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
131142
- os: windows-2022
132143
cuda: "12.8"
133144
# Oldest supported version, keep in sync with README.md
134145
rustc: "1.75.0"
135146
extra_args: --no-fail-fast
136147
extra_desc: cuda12.8
148+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
137149
- os: windows-2022
138150
cuda: "12.8"
139151
rustc: nightly
140152
allow_failure: true
141153
extra_args: --features=unstable
142154
extra_desc: cuda12.8
155+
no_coverage: ${{ needs.checks.outputs.has-codecov-token != 'true' }}
143156
- os: windows-2022
144157
cuda: "12.8"
145158
rustc: beta
@@ -199,7 +212,6 @@ jobs:
199212
echo '[env]
200213
LLVM_PROFILE_FILE = { value = "target/debug/coverage/default-%p-%8m.profraw", relative = true }' >> .cargo/config.toml
201214
202-
203215
- name: Execute tests
204216
run: cargo test --locked --all-targets ${{ matrix.extra_args }}
205217
env:

0 commit comments

Comments
 (0)