Files
ureq/.github/workflows/test.yml
Jacob Hoffman-Andrews b58a3a53b0 Add test.sh. (#173)
This emulates the test matrix that gets run in CI, making it easier to
find failures locally.

There was one conflict in the matrix: when JSON is enabled and TLS is
disabled, two of the doctests would fail. This was previous worked
around as an exclude in the github workflow. I changed the JSON doctest
to use HTTP instead.
2020-10-03 20:47:35 -07:00

55 lines
1.3 KiB
YAML

on: [push, pull_request]
name: CI
jobs:
doc:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Docs
uses: actions-rs/cargo@v1
with:
command: doc
# Keep in sync with Cargo.toml's [package.metadata.docs.rs]
args: --no-default-features --no-deps --features "tls json charset cookies socks-proxy"
build_and_test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
tls:
- ""
- tls
- native-tls
feature:
- ""
- json
- charset
- cookies
- socks-proxy
what:
- "--doc"
- "--tests"
env:
RUST_BACKTRACE: "1"
RUSTFLAGS: "-D dead_code -D unused-variables -D unused"
steps:
- uses: actions/checkout@master
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.what }} --no-default-features --features "${{ matrix.tls }} ${{ matrix.feature }}"