Remove "what" section of test matrix. (#239)
We were generating two whole sets of jobs, for --tests and --docs separately. But the default invocation of cargo runs both tests and doctests. We can save some resources and speed up our test runs by allowing cargo to do both in one invocation.
This commit is contained in:
committed by
GitHub
parent
6a7b064f2a
commit
96f6ed15d7
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -33,9 +33,6 @@ jobs:
|
|||||||
- charset
|
- charset
|
||||||
- cookies
|
- cookies
|
||||||
- socks-proxy
|
- socks-proxy
|
||||||
what:
|
|
||||||
- "--doc"
|
|
||||||
- "--tests"
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: "1"
|
RUST_BACKTRACE: "1"
|
||||||
RUSTFLAGS: "-D dead_code -D unused-variables -D unused"
|
RUSTFLAGS: "-D dead_code -D unused-variables -D unused"
|
||||||
@@ -50,4 +47,4 @@ jobs:
|
|||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: ${{ matrix.what }} --no-default-features --features "${{ matrix.tls }} ${{ matrix.feature }}"
|
args: --no-default-features --features "${{ matrix.tls }} ${{ matrix.feature }}"
|
||||||
|
|||||||
4
test.sh
4
test.sh
@@ -6,11 +6,9 @@ export RUSTFLAGS="-D dead_code -D unused-variables -D unused"
|
|||||||
|
|
||||||
for tls in "" tls ; do
|
for tls in "" tls ; do
|
||||||
for feature in "" json charset cookies socks-proxy ; do
|
for feature in "" json charset cookies socks-proxy ; do
|
||||||
for what in --doc --tests ; do
|
if ! cargo test --no-default-features --features "${tls} ${feature}" ; then
|
||||||
if ! cargo test "${what}" --no-default-features --features "${tls} ${feature}" ; then
|
|
||||||
echo Command failed: cargo test \"${what}\" --no-default-features --features \"${tls} ${feature}\"
|
echo Command failed: cargo test \"${what}\" --no-default-features --features \"${tls} ${feature}\"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user