Update GitHub workflow. #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
stable: | ||
name: Test + Clippy (stable) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
set -e | ||
rustup toolchain install stable --no-self-update | ||
rustup default stable | ||
rustup component add clippy | ||
RUSTFLAGS=-Dwarnings cargo test | ||
cargo clippy -- -Dwarnings | ||
RUSTFLAGS=-Dwarnings cargo build --manifest-path fuzz/Cargo.toml --all | ||
nightly: | ||
name: Test + Clippy (nightly) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
set -e | ||
rustup toolchain install nightly --no-self-update | ||
rustup default nightly | ||
rustup component add clippy | ||
RUSTFLAGS=-Dwarnings cargo test | ||
cargo clippy -- -Dwarnings | ||
RUSTFLAGS=-Dwarnings cargo build --manifest-path fuzz/Cargo.toml --all | ||
stable-no-default-features: | ||
name: Test + Clippy (stable, no default features) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
set -e | ||
rustup toolchain install stable --no-self-update | ||
rustup default stable | ||
rustup component add clippy | ||
RUSTFLAGS=-Dwarnings cargo test --no-default-features && cargo clippy --no-default-features -- -Dwarnings | ||
msrv: | ||
name: Test (MSRV) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
set -e | ||
rustup toolchain install 1.46 --no-self-update | ||
rustup default 1.46 | ||
# We expect an unknown_lints warning on 1.46. | ||
# Any new warnings added should be flagged because they might indicate | ||
# a bug, but feel free to add them to -A below if they are harmless and | ||
# don't happen on newer Rust versions. | ||
# Also, no Clippy because we probably don't care what old Clippy | ||
# thinks. | ||
RUSTFLAGS='-Dwarnings -Aunknown_lints' cargo test | ||