Changed and to and , and deprecated both methods. #3
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: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
rustfmt: | |
name: Check rustfmt | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- run: cargo fmt --all -- --check | |
test: | |
name: Run linter | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
env: | |
RUSTFLAGS: -D warnings | |
RUSTDOCFLAGS: -D warnings | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: hecrj/setup-rust-action@v1 | |
with: | |
components: clippy | |
- name: Cache cargo directories | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | |
${{ runner.os }}-cargo- | |
- name: Cache cargo target dirs | |
uses: actions/cache@v2 | |
with: | |
path: target | |
key: ${{ runner.os }}-target-lint-stable-${{ hashFiles('**/Cargo.toml') }} | |
restore-keys: | | |
${{ runner.os }}-target-lint-stable-${{ hashFiles('**/Cargo.toml') }} | |
${{ runner.os }}-target-lint-stable- | |
${{ runner.os }}-target-lint- | |
- name: all features | |
run: cargo clippy | |
- name: no features | |
run: cargo clippy --no-default-features | |
- name: examples, all features | |
run: cargo clippy --examples | |
- name: examples, no features | |
run: cargo clippy --examples --no-default-features | |
- name: tests | |
run: cargo clippy --examples --no-default-features | |
- name: examples, all features | |
run: cargo test | |
- name: examples, no features | |
run: cargo test --no-default-features |