run cargo fmt and fix ci #1
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: Cargo Build & Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_test: | |
name: Rust project - latest | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- rust: 1.64.0 # MSRV | |
- rust: stable | |
test_all: --all | |
- rust: beta | |
test_all: --all | |
- rust: nightly | |
test_all: --all | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Build | |
run: | | |
cargo build --verbose | |
- name: Tests | |
run: | | |
cargo test --verbose | |
rustfmt: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
matrix: | |
include: | |
- rust: stable | |
rustfmt: rustfmt | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
components: ${{ matrix.rustfmt }} | |
override: true | |
- name: Rustfmt | |
if: matrix.rustfmt | |
run: cargo fmt -- --check | |
miri: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: miri | |
- run: cargo miri test |