Skip to content

Check docs in QA, modernise lints #37

Check docs in QA, modernise lints

Check docs in QA, modernise lints #37

Workflow file for this run

name: "Pre-merge Quality-Control"
on:
push:
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
name: "Test"
strategy:
matrix:
rust-toolchain: ['stable', 'nightly']
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install rust
id: rust-install
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust-toolchain }}
- uses: actions/cache@v3
with:
path: |
~/.cargo
target/
key: ${{ runner.os }}-${{ steps.rust-install.outputs.cachekey }}-cargo
- name: Run testsuite
env:
RUSTFLAGS: -D warnings
run: |
cargo +${{steps.rust-install.outputs.name}} test
cargo +${{steps.rust-install.outputs.name}} test --all-features
qc:
runs-on: ubuntu-latest
name: "Quality Control"
strategy:
matrix:
rust-toolchain: ['stable', 'nightly']
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install rust
id: rust-install
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rustfmt, clippy
- uses: actions/cache@v3
with:
path: |
~/.cargo
target/
key: ${{ runner.os }}-${{ steps.rust-install.outputs.cachekey }}-cargo
- name: Check formatting
run: |
cargo +${{steps.rust-install.outputs.name}} fmt --check
- name: Consult Clippy
run: |
cargo +${{steps.rust-install.outputs.name}} clippy -- -D warnings
cargo +${{steps.rust-install.outputs.name}} clippy --all-features -- -D warnings
- name: Check docs
run: |
cargo +${{steps.rust-install.outputs.name}} rustdoc -- -D warnings
bench:
runs-on: ubuntu-latest
name: "Benchmarks"
steps:
- uses: actions/checkout@v3
- name: Install rust
id: rust-install
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
# We deliberately use a separate cache for this job, so that we can
# get consistent comparisons with previous runs, without other jobs'
# caching possibly squashing that
- uses: actions/cache@v3
with:
path: |
~/.cargo
target/
key: ${{ runner.os }}-${{ steps.rust-install.outputs.cachekey }}-cargo-criterion
- name: Measure
run: |
cargo bench