Fix cargo clippy #1045
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: Continuous integration | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check-tabled: | |
name: Check tabled | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [nightly, stable] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
features: | |
[ | |
"", | |
"std", | |
"ansi", | |
"derive", | |
"macros", | |
"ansi,derive", | |
"ansi,macros", | |
"macros,derive", | |
"ansi,derive,macros", | |
] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo check --manifest-path=./tabled/Cargo.toml --all-targets --no-default-features --features=${{ matrix.features }} | |
check-papergrid: | |
name: Check papergrid | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable] | |
os: [ubuntu-latest] | |
features: ["", "std", "ansi", "std,ansi"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo check --manifest-path=./papergrid/Cargo.toml --all-targets --no-default-features --features=${{ matrix.features }} | |
check-csv_to_table: | |
name: Check csv_to_table | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable] | |
os: [ubuntu-latest] | |
features: ["", "ansi"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo check --manifest-path=./csv_to_table/Cargo.toml --all-targets --no-default-features --features=${{ matrix.features }} | |
check-json_to_table: | |
name: Check json_to_table | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable] | |
os: [ubuntu-latest] | |
features: ["", "ansi"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo check --manifest-path=./json_to_table/Cargo.toml --all-targets --no-default-features --features=${{ matrix.features }} | |
check-static_table: | |
name: Check static_table | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo check --manifest-path=./static_table/Cargo.toml --all-targets | |
check-tabled_derive: | |
name: Check tabled_derive | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: [stable] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo check --manifest-path=./tabled_derive/Cargo.toml --all-targets | |
msrv: | |
name: MSRV | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@1.61.0 | |
- run: cargo build --manifest-path=./tabled/Cargo.toml --all-features | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- run: cargo fmt --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl] | |
features: ["", "std", "ansi"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
target: ${{ matrix.target }} | |
- run: cargo clippy --all --all-targets --no-default-features --features=${{ matrix.features }} -- -D warnings | |
test: | |
name: Unit Test Suite | |
needs: | |
[ | |
check-tabled, | |
check-static_table, | |
check-csv_to_table, | |
check-json_to_table, | |
check-papergrid, | |
check-tabled_derive, | |
fmt, | |
clippy, | |
] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl] | |
features: ["", "ansi"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
target: ${{ matrix.target }} | |
- run: cargo test --workspace --no-fail-fast --target ${{ matrix.target }} --features=${{ matrix.features }} | |
test_quickcheck: | |
name: A quickcheck test suite | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: cargo test --no-fail-fast --manifest-path tabled/tests/qc/Cargo.toml -- --include-ignored qc_ | |
coverage: | |
name: Coveralls | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Run cargo-tarpaulin | |
uses: actions-rs/tarpaulin@v0.1 | |
with: | |
version: "0.15.0" | |
args: "--workspace --out Lcov --output-dir ./coverage --exclude-files target/* --exclude-files tabled_derive/* --exclude-files examples/*" | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |