Skip to content

Commit

Permalink
ci: bump rust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SichangHe committed Sep 15, 2024
1 parent fac6abe commit cec2ffb
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,35 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust registry based on toml file
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cargo/registry/cache/
key: rust-${{ hashFiles('Cargo.toml') }}
- uses: mozilla-actions/[email protected].3
- uses: mozilla-actions/[email protected].5
- run: cargo test --workspace
- run: cargo test --workspace -F=py

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust registry based on toml file
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cargo/registry/cache/
key: rust-${{ hashFiles('Cargo.toml') }}
- uses: mozilla-actions/[email protected].3
- uses: mozilla-actions/[email protected].5
- run: cargo clippy --workspace
- run: cargo clippy --workspace -F=py

rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Cache Rust registry based on toml file
uses: actions/cache@v3
with:
path: ~/.cargo/registry/cache/
key: rust-${{ hashFiles('Cargo.toml') }}
- uses: mozilla-actions/[email protected]
- run: cargo fmt -- --check

0 comments on commit cec2ffb

Please sign in to comment.