Skip to content

Use rust 1.76.0 in CI #104

Use rust 1.76.0 in CI

Use rust 1.76.0 in CI #104

Workflow file for this run

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: Setup rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.76.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: Setup rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.76.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: Setup rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.76.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