Skip to content

Commit

Permalink
Update CI actions
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPickering committed Feb 13, 2024
1 parent 992e84a commit 2d3bd10
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
name: "Rustfmt"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache cargo files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -27,21 +27,18 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
run: cargo fmt -- --check

# Run clippy and tests. We just use the native target here and hope the results
# are the same for all others
lint-test:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache Rust files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -52,18 +49,15 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D clippy::all'
run: cargo clippy --all-targets --all-features -- -D clippy::all
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache Rust files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -77,6 +71,4 @@ jobs:
run: sudo apt-get install -y zsh fish

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
run: cargo test

0 comments on commit 2d3bd10

Please sign in to comment.