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 authored and GitHub committed 2020-11-22 00:23:59 -08:00
1 parent 6a7b064f2a
commit 96f6ed15d7
2 files changed
+2 -7

No files matched your search

+1 -4
View File
@@ -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 }}"
+1 -3
View File
@@ -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