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:
Jacob Hoffman-Andrews
2020-11-22 00:23:59 -08:00
committed by GitHub
parent 6a7b064f2a
commit 96f6ed15d7
2 changed files with 5 additions and 10 deletions

View File

@@ -33,9 +33,6 @@ jobs:
- charset
- cookies
- socks-proxy
what:
- "--doc"
- "--tests"
env:
RUST_BACKTRACE: "1"
RUSTFLAGS: "-D dead_code -D unused-variables -D unused"
@@ -50,4 +47,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.what }} --no-default-features --features "${{ matrix.tls }} ${{ matrix.feature }}"
args: --no-default-features --features "${{ matrix.tls }} ${{ matrix.feature }}"

View File

@@ -6,11 +6,9 @@ export RUSTFLAGS="-D dead_code -D unused-variables -D unused"
for tls in "" tls ; do
for feature in "" json charset cookies socks-proxy ; do
for what in --doc --tests ; do
if ! cargo test "${what}" --no-default-features --features "${tls} ${feature}" ; then
if ! cargo test --no-default-features --features "${tls} ${feature}" ; then
echo Command failed: cargo test \"${what}\" --no-default-features --features \"${tls} ${feature}\"
exit 1
fi
done
done
done