Skip to content

Commit 5b94915

Browse files
authored
test: add required test action (#66)
1 parent 3de9424 commit 5b94915

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/run-tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v3
23+
with:
24+
version: '10.7.1'
25+
26+
- name: Get pnpm store directory
27+
id: pnpm-cache
28+
run: |
29+
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
30+
31+
- name: Setup pnpm cache
32+
uses: actions/cache@v4
33+
with:
34+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
35+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-store-
38+
39+
- name: Install dependencies
40+
run: pnpm install
41+
42+
- name: Run tests
43+
run: pnpm test

0 commit comments

Comments
 (0)