File tree 1 file changed +43
-0
lines changed
1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments