Skip to content

Commit

Permalink
try split action cache
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Jul 26, 2023
1 parent 5e91e27 commit 3b797ed
Showing 1 changed file with 39 additions and 19 deletions.
58 changes: 39 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,10 @@ jobs:
command: fmt
args: --all -- --check

e2e:
name: End-to-end tests
build_js:
name: Build JS assets
runs-on: ubuntu-latest
steps:
- run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Get pnpm store directory
id: pnpm-cache
run: |
Expand All @@ -51,6 +40,43 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- uses: pnpm/action-setup@v2.0.1
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Install JS deps
working-directory: ./browser/
run: |
pnpm install
pnpm run playwright-install
- name: Make JS assets available for consequent builds
uses: actions/cache@v2
with:
path: ./browser/node_modules
key: ${{ runner.os }}-js-deps-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-js-deps-
e2e:
name: End-to-end tests
runs-on: ubuntu-latest
needs: [build_js]
steps:
- run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev
# Needs to match with build_js cache step
- name: Restore Cached Packages
uses: actions/cache@v2
with:
path: ./browser/node_modules
key: ${{ runner.os }}-js-deps-${{ hashFiles('**/pnpm-lock.yaml') }}

- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
Expand All @@ -60,12 +86,6 @@ jobs:
- name: Rust Cache
uses: Swatinem/rust-cache@v1.3.0

- name: Install JS deps
working-directory: ./browser/
run: |
pnpm install
pnpm run playwright-install
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
name: cargo clippy
Expand Down

0 comments on commit 3b797ed

Please sign in to comment.