24
24
- run : rustup update stable && rustup default stable
25
25
- run : rustup component add rustfmt
26
26
- run : cargo fmt --all --check
27
- - run : |
28
- for manifest in `find crates benches/benchsuite benches/capture -name Cargo.toml`
29
- do
30
- echo check fmt for $manifest
31
- cargo fmt --all --manifest-path $manifest --check
32
- done
27
+ - run : cargo fmt --all --check --manifest-path crates/resolver-tests/Cargo.toml
33
28
34
29
# Ensure there are no clippy warnings
35
30
clippy :
39
34
- run : rustup update stable && rustup default stable
40
35
- run : rustup component add clippy
41
36
# Only check cargo lib for now
42
- - run : cargo clippy -p cargo --lib -- -D warnings
37
+ # TODO: check every members
38
+ - run : cargo clippy -p cargo --lib --no-deps -- -D warnings
43
39
44
40
test :
45
41
runs-on : ${{ matrix.os }}
@@ -101,47 +97,41 @@ jobs:
101
97
run : echo CARGO_CONTAINER_TESTS=1 >> $GITHUB_ENV
102
98
if : matrix.os == 'ubuntu-latest'
103
99
104
- - run : cargo test
100
+ - run : cargo test -p cargo
105
101
- name : Clear intermediate test output
106
102
run : ci/clean-test-output.sh
107
103
- name : gitoxide tests (all git-related tests)
108
- run : cargo test git
104
+ run : cargo test -p cargo git
109
105
env :
110
106
__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2 : 1
111
107
# The testsuite generates a huge amount of data, and fetch-smoke-test was
112
108
# running out of disk space.
113
109
- name : Clear test output
114
110
run : ci/clean-test-output.sh
111
+ # This only tests `cargo fix` because fix-proxy-mode is one of the most
112
+ # complicated subprocess management in Cargo.
115
113
- name : Check operability of rustc invocation with argfile
114
+ run : ' cargo test -p cargo --test testsuite -- fix::'
116
115
env :
117
116
__CARGO_TEST_FORCE_ARGFILE : 1
118
- run : |
119
- # This only tests `cargo fix` because fix-proxy-mode is one of the most
120
- # complicated subprocess management in Cargo.
121
- cargo test --test testsuite -- fix::
122
- - run : cargo test --manifest-path crates/cargo-test-support/Cargo.toml
123
- env :
124
- CARGO_TARGET_DIR : target
117
+ - run : cargo test -p cargo-test-support
125
118
- run : cargo test -p cargo-platform
126
119
- run : cargo test -p cargo-util
127
- - run : cargo test --manifest-path crates/ home/Cargo.toml
128
- - run : cargo test --manifest-path crates/ mdman/Cargo.toml
129
- - run : cargo build --manifest-path crates/credential/ cargo-credential-1password/Cargo.toml
130
- - run : cargo build --manifest-path crates/credential/ cargo-credential-gnome-secret/Cargo.toml
120
+ - run : cargo test -p home
121
+ - run : cargo test -p mdman
122
+ - run : cargo build -p cargo-credential-1password
123
+ - run : cargo build -p cargo-credential-gnome-secret
131
124
if : matrix.os == 'ubuntu-latest'
132
- - run : cargo build --manifest-path crates/credential/ cargo-credential-macos-keychain/Cargo.toml
125
+ - run : cargo build -p cargo-credential-macos-keychain
133
126
if : matrix.os == 'macos-latest'
134
- - run : cargo build --manifest-path crates/credential/ cargo-credential-wincred/Cargo.toml
127
+ - run : cargo build -p cargo-credential-wincred
135
128
if : matrix.os == 'windows-latest'
136
129
- name : Check benchmarks
137
- env :
138
- # Share the target dir to try to cache a few build-time deps.
139
- CARGO_TARGET_DIR : target
140
130
run : |
141
131
# This only tests one benchmark since it can take over 10 minutes to
142
132
# download all workspaces.
143
- cargo test --manifest-path benches/ benchsuite/Cargo.toml --all-targets -- cargo
144
- cargo check --manifest-path benches/ capture/Cargo.toml
133
+ cargo test -p benchsuite --all-targets -- cargo
134
+ cargo check -p capture
145
135
# The testsuite generates a huge amount of data, and fetch-smoke-test was
146
136
# running out of disk space.
147
137
- name : Clear benchmark output
@@ -164,7 +154,7 @@ jobs:
164
154
- run : rustup target add i686-unknown-linux-gnu
165
155
- run : sudo apt update -y && sudo apt install gcc-multilib libsecret-1-0 libsecret-1-dev -y
166
156
- run : rustup component add rustfmt || echo "rustfmt not available"
167
- - run : cargo test
157
+ - run : cargo test -p cargo
168
158
env :
169
159
__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2 : 1
170
160
@@ -175,7 +165,7 @@ jobs:
175
165
- run : rustup update nightly && rustup default nightly
176
166
- run : rustup component add rust-src
177
167
- run : cargo build
178
- - run : cargo test --test build-std
168
+ - run : cargo test -p cargo - -test build-std
179
169
env :
180
170
CARGO_RUN_BUILD_STD_TESTS : 1
181
171
docs :
@@ -192,7 +182,8 @@ jobs:
192
182
mkdir mdbook
193
183
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.27/mdbook-v0.4.27-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
194
184
echo `pwd`/mdbook >> $GITHUB_PATH
195
- - run : cargo doc --document-private-items --no-deps
185
+ # TODO: should check all workspace members
186
+ - run : cargo doc -p cargo --document-private-items --no-deps
196
187
env :
197
188
RUSTDOCFLAGS : -D warnings
198
189
- run : cd src/doc && mdbook build --dest-dir ../../target/doc
0 commit comments