Skip to content

Commit

Permalink
chore: use pnpm for github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Jul 1, 2024
1 parent bd4c88f commit 3b8a006
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
name: Unit Tests
on: push
on:
- push
- pull_request

jobs:
build:
cache-and-install:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
cache: 'pnpm'

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install packages
- name: Install dependencies
run: pnpm install

- name: Run unit tests
Expand Down

0 comments on commit 3b8a006

Please sign in to comment.