Skip to content

Commit

Permalink
fix: update rust toolchain in actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dj95 committed Mar 5, 2024
1 parent 119a52e commit a941f1d
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
name: Rust

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

env:
CARGO_TERM_COLOR: always
Expand All @@ -13,29 +14,36 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: '1.76.0'
profile: minimal
override: true
target: x86_64-unknown-linux-gnu
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

cargo-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Clippy
run: cargo clippy --all-targets --all-features

cargo-fmt:
name: Ensure 'cargo fmt' has been run
runs-on: ubuntu-20.04
steps:
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: actions/checkout@v3
- run: cargo fmt -- --check
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: actions/checkout@v3
- run: cargo fmt -- --check

cargo-audit:
name: cargo audit
runs-on: ubuntu-latest
Expand Down

0 comments on commit a941f1d

Please sign in to comment.