Merge pull request #23 from epompeii/just_main #110
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 | |
# This workflow run tests and build for each push | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- 'feature-**' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- nightly-2023-10-25 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: streetsidesoftware/cspell-action@v5 | |
- uses: cargo-bins/cargo-binstall@main | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: "clippy, rustfmt" | |
- name: Info | |
run: | | |
cargo binstall -y --git https://github.com/estk/cargo-manifmt cargo-manifmt@2.0.0 | |
rustc --version | |
cargo --version --verbose | |
cargo clippy --version | |
cargo fmt --version | |
- name: Lint | |
run: | | |
cargo fmt -- --check | |
cargo clippy -- -D warnings | |
cargo manifmt --check | |
cargo: | |
name: Build & Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
features_arg: | |
- --features serde | |
toolchain: | |
- stable | |
- beta | |
- nightly | |
- nightly-2023-10-25 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- uses: taiki-e/install-action@nextest | |
- name: Info | |
run: | | |
cargo --version --verbose | |
rustc --version | |
- name: Test | |
run: | | |
cargo check | |
cargo nextest run --all ${{ matrix.features_arg }} | |
- name: Build | |
run: | | |
cargo build --release ${{ matrix.features_arg }} |