Update deps #103
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: Test & Audit | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use rust 1.75.0 | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.75.0 | |
components: rustfmt, clippy | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: Install cargo audit | |
run: cargo install cargo-audit | |
- name: Build | |
run: cargo build --workspace --features strict --verbose | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use rust 1.75.0 | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.75.0 | |
components: rustfmt, clippy | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: Run tests | |
run: | | |
export PATH="${PATH}:${GITHUB_WORKSPACE}/fixtures/bin" | |
cargo test --verbose --color=always | |
audit: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use rust 1.75.0 | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.75.0 | |
components: rustfmt, clippy | |
- name: Set up cargo cache | |
uses: actions/cache@v3 | |
continue-on-error: false | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: Install cargo audit | |
run: cargo install cargo-audit | |
- name: Cargo audit | |
run: cargo audit | |
- name: Cargo format check | |
run: cargo fmt --check | |
- name: Cargo clippy | |
run: cargo clippy | |
audit_md: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: PurpleBooth/[email protected] | |
name: Check markdown formatting |