Skip to content

Commit

Permalink
Merge pull request #25 from johanhelsing/rust-cache
Browse files Browse the repository at this point in the history
Add rust-cache to ci
  • Loading branch information
johanhelsing committed Apr 8, 2023
2 parents bddaa89 + 8051016 commit 704a5ab
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 @@ -15,16 +15,15 @@ jobs:
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@v2

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

test:
name: Test Suite
Expand All @@ -34,16 +33,15 @@ jobs:
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true

- name: Rust Cache
uses: Swatinem/rust-cache@v2

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

lints:
name: Lints
Expand All @@ -53,21 +51,16 @@ jobs:
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Rust Cache
uses: Swatinem/rust-cache@v2

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

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: cargo clippy -- -D warnings

0 comments on commit 704a5ab

Please sign in to comment.