Skip to content

Commit

Permalink
Add rust cache to CI (#34)
Browse files Browse the repository at this point in the history
# Motivation

This PR adds caching to the Cargo Test and Playwright workflows, which
should improve its speed quite a bit.

Further changes should be made to CI to only build artifacts once.
Currently each workflow builds their own. However, that will be done in
separate PRs.
  • Loading branch information
Frederik Rothenberger authored Jun 17, 2024
1 parent c4e491b commit bb2127a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/cache@v4
id: cache
with:
path: |
~/.cargo
target
key: cargo-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }}
restore-keys: cargo-
- name: Install dependencies
working-directory: dummy-e2e
run: npm ci
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache
with:
path: |
~/.cargo
target
key: cargo-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }}
restore-keys: cargo-

- name: Install Rust
run: |
rustup component add rustfmt
rustup component add clippy
cargo --version
- name: Check Format
run: cargo fmt --all -- --check
Expand Down

0 comments on commit bb2127a

Please sign in to comment.