Skip to content

Commit

Permalink
run rust build and lint in separate jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Esgrove committed Feb 8, 2024
1 parent e677e06 commit 41ee6eb
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
CARGO_TERM_COLOR: always

jobs:
rust:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand All @@ -51,10 +51,31 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build
run: cargo build --verbose
run: cargo build

- name: Run tests
run: cargo test
run: cargo test --no-fail-fast

lint:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v4

- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Check formatting
run: cargo fmt --check --verbose
Expand Down

0 comments on commit 41ee6eb

Please sign in to comment.