Skip to content

Commit

Permalink
chore(ci): update build, test and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanle committed Dec 5, 2024
1 parent 9c42abf commit 605d797
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,23 @@ on:
- main

jobs:
build:
test:
name: cargo test
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test --all-features

- name: Cache cargo registry
uses: actions/cache@v3
# Check formatting with rustfmt
formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Ensure rustfmt is installed and setup problem matcher
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build project
run: cargo build --workspace --all-targets

- name: Run tests
run: cargo test --workspace --all-targets --all-features
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1

0 comments on commit 605d797

Please sign in to comment.