Skip to content

Merge pull request #14 from contentstech-com/patch-1 #16

Merge pull request #14 from contentstech-com/patch-1

Merge pull request #14 from contentstech-com/patch-1 #16

Workflow file for this run

name: test
on:
push:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
test:
name: Build & test
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
rust:
- stable
- beta
- nightly
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
default: true
profile: minimal
- name: Restore cache
uses: Swatinem/rust-cache@v1
- name: Build & test
env:
RUSTFLAGS: -D warnings
run: cargo test --release --all-features
rustfmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
components: rustfmt
- run: cargo fmt --all -- --check
links:
name: Check documentation links
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- name: Restore cache
uses: Swatinem/rust-cache@v1
- name: Check links
run: cargo rustdoc --all-features -- -D warnings
clippy:
name: Clippy lints
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
components: clippy
- name: Restore cache
uses: Swatinem/rust-cache@v1
- name: Run clippy linter
run: cargo clippy --all --tests -- -D clippy::all -D warnings
bench:
name: Verify benchmarks compile
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
default: true
- name: Restore cache
uses: Swatinem/rust-cache@v1
- name: run tests
run: cargo test --all --release --benches --all-features
miri:
name: Miri checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
default: true
components: miri
- name: Restore cache
uses: Swatinem/rust-cache@v1
- name: Run miri tests
run: cargo miri test miri