New version (maybe 0.2.0) #82
Workflow file for this run
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: Rust CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ["*"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
strategy: | |
fail-fast: true | |
matrix: | |
# 1.67 is the MSRV for the crate | |
rust: ['nightly', 'beta', 'stable', '1.67'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Install nightly toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{matrix.rust}} | |
- name: Build | |
if: matrix.rust != 'nightly' | |
run: cargo build --all-targets | |
- name: Build with 'nightly' feature | |
if: matrix.rust == 'nightly' | |
run: cargo build --all-targets --features nightly | |
- name: Test | |
if: matrix.rust != 'nightly' | |
run: cargo test | |
- name: Test with 'nightly' feature | |
if: matrix.rust == 'nightly' | |
run: cargo test --features nightly | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Install nightly toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Check format | |
run: cargo fmt -- --check | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Install nightly toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy | |
- name: Lint | |
run: cargo clippy --all-features | |
miri: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Install nightly toolchain | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: miri | |
- name: Run miri tests | |
run: cargo miri test |