-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (35 loc) · 1.02 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Test
on:
push: {}
jobs:
tests:
strategy:
matrix:
step:
- name: Lint
command: pnpm lint
- name: Typecheck
command: pnpm typecheck
- name: Unit tests
command: pnpm test:unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Get pnpm store directory
id: pnpm-store-dir-path
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- name: Use pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-store-dir-path.outputs.dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: ${{ matrix.step.name }}
run: ${{ matrix.step.command }}