Skip to content

Fix Serde implementation #102

Fix Serde implementation

Fix Serde implementation #102

Workflow file for this run

name: Continuous integration
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
jobs:
# Ensure the crate builds
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.56.0, stable, nightly]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Tests
run: |
cargo test -v --no-default-features --tests --lib &&
cargo build --verbose --features "$FEATURES" &&
cargo test --verbose --features "$FEATURES" &&
cargo test --verbose --release --features "$FEATURES"
# Use clippy to lint for code smells
clippy:
runs-on: ubuntu-latest
strategy:
matrix:
# Run Clippy only on stable
rust: [stable]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: clippy
override: true
- name: Run Clippy
run: |
cargo clippy
# Enforce rustfmt formatting
formatting:
runs-on: ubuntu-latest
strategy:
matrix:
# Run formatting checks only on stable
rust: [stable]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: rustfmt
override: true
- name: Run Clippy
run: |
cargo fmt --all --check
# Ensure the benchmarks compile
benchmark_compiles:
runs-on: ubuntu-latest
strategy:
matrix:
# Check builds only on stable
rust: [stable]
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.rust }}
components: clippy
override: true
- name: Run Clippy
run: |
cd benches
cargo bench --bench benches --no-run