Skip to content

Commit 9ed4a24

Browse files
committed
Auto merge of #12342 - epage:ci, r=weihanglo
chore(ci): Automatically test new packages by using `--workspace` ### What does this PR try to resolve? This is a part of #11987 that was unblocked by #12321 and #11993 ### How should we test and review this PR? Relying on CI to verify this I'd prefer to move the `cargo test --workspace` step earlier but we run out of disk space if we do (we currently only have 661 MB of headroom of windows-gnu) See the individual commits for smaller chunks and explanations for why changes were made.
2 parents 445838d + 6968d41 commit 9ed4a24

File tree

1 file changed

+39
-45
lines changed

1 file changed

+39
-45
lines changed

.github/workflows/main.yml

+39-45
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,41 @@ permissions:
1313
contents: read
1414

1515
jobs:
16+
success:
17+
permissions:
18+
contents: none
19+
name: bors build finished
20+
needs:
21+
- build_std
22+
- clippy
23+
- docs
24+
- lockfile
25+
- resolver
26+
- rustfmt
27+
- test
28+
- test_gitoxide
29+
runs-on: ubuntu-latest
30+
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
31+
steps:
32+
- run: echo ok
33+
failure:
34+
permissions:
35+
contents: none
36+
name: bors build finished
37+
needs:
38+
- build_std
39+
- clippy
40+
- docs
41+
- lockfile
42+
- resolver
43+
- rustfmt
44+
- test
45+
- test_gitoxide
46+
runs-on: ubuntu-latest
47+
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
48+
steps:
49+
- run: exit 1
50+
1651
# Check Code style quickly by running `rustfmt` over all code
1752
rustfmt:
1853
runs-on: ubuntu-latest
@@ -119,6 +154,7 @@ jobs:
119154
- run: cargo test -p cargo
120155
- name: Clear intermediate test output
121156
run: ci/clean-test-output.sh
157+
122158
- name: gitoxide tests (all git-related tests)
123159
run: cargo test -p cargo git
124160
env:
@@ -127,22 +163,14 @@ jobs:
127163
# running out of disk space.
128164
- name: Clear test output
129165
run: ci/clean-test-output.sh
166+
130167
# This only tests `cargo fix` because fix-proxy-mode is one of the most
131168
# complicated subprocess management in Cargo.
132169
- name: Check operability of rustc invocation with argfile
133170
run: 'cargo test -p cargo --test testsuite -- fix::'
134171
env:
135172
__CARGO_TEST_FORCE_ARGFILE: 1
136-
- run: cargo test -p cargo-test-support
137-
- run: cargo test -p cargo-platform
138-
- run: cargo test -p cargo-util
139-
- run: cargo test -p home
140-
- run: cargo test -p mdman
141-
- run: cargo build -p cargo-credential-1password
142-
- run: cargo build -p cargo-credential-macos-keychain
143-
- run: cargo build -p cargo-credential-wincred
144-
- run: cargo build -p cargo-credential-gnome-secret
145-
if: matrix.os == 'ubuntu-latest'
173+
- run: cargo test --workspace --exclude cargo --exclude benchsuite
146174
- name: Check benchmarks
147175
run: |
148176
# This only tests one benchmark since it can take over 10 minutes to
@@ -153,6 +181,7 @@ jobs:
153181
# running out of disk space.
154182
- name: Clear benchmark output
155183
run: ci/clean-test-output.sh
184+
156185
- name: Fetch smoke test
157186
run: ci/fetch-smoke-test.sh
158187

@@ -211,38 +240,3 @@ jobs:
211240
cd target
212241
curl -sSLO https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
213242
sh linkcheck.sh --all --path ../src/doc cargo
214-
215-
success:
216-
permissions:
217-
contents: none
218-
name: bors build finished
219-
needs:
220-
- build_std
221-
- clippy
222-
- docs
223-
- lockfile
224-
- resolver
225-
- rustfmt
226-
- test
227-
- test_gitoxide
228-
runs-on: ubuntu-latest
229-
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
230-
steps:
231-
- run: echo ok
232-
failure:
233-
permissions:
234-
contents: none
235-
name: bors build finished
236-
needs:
237-
- build_std
238-
- clippy
239-
- docs
240-
- lockfile
241-
- resolver
242-
- rustfmt
243-
- test
244-
- test_gitoxide
245-
runs-on: ubuntu-latest
246-
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
247-
steps:
248-
- run: exit 1

0 commit comments

Comments
 (0)