Skip to content

Merge pull request #50 from swsnr/elide-lifetimes #227

Merge pull request #50 from swsnr/elide-lifetimes

Merge pull request #50 from swsnr/elide-lifetimes #227

Workflow file for this run

name: Test
on:
push:
# Don't build tags; that's redundant with pushes to main normally.
tags-ignore: "*"
# Only build main, for all other branches rely on pull requests. This
# avoids duplicate builds for pull requests.
branches: main
# Don't build for trivial changes
paths-ignore:
- "*.md"
- "LICENSE*"
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# Test against MRSV and stable
rust: ["1.66.0", "stable"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: clippy,rustfmt
toolchain: ${{ matrix.rust }}
- run: cargo build --all-targets --locked
- run: cargo clippy --all-targets --locked
# Run clippy only on stable target; we don't need lints from old Rust
# versions.
if: "${{ matrix.rust == 'stable' }}"
- run: cargo test --locked
- run: cargo doc
- run: cargo fmt -- --check
# Run fmt check only on stable rust, as our reference.
if: "${{ matrix.rust == 'stable' }}"
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
semver-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: obi1kenobi/cargo-semver-checks-action@v2