File tree Expand file tree Collapse file tree 1 file changed +35
-5
lines changed Expand file tree Collapse file tree 1 file changed +35
-5
lines changed Original file line number Diff line number Diff line change 7
7
test :
8
8
name : Run tests and collect coverage
9
9
runs-on : ubuntu-latest
10
+
10
11
steps :
11
12
- name : Checkout
12
13
uses : actions/checkout@v4
13
14
with :
14
15
fetch-depth : 0
15
16
16
- - name : Set up Node
17
+ - uses : pnpm/action-setup@v2
18
+ with :
19
+ version : 8
20
+
21
+ - name : Setup Node.js
17
22
uses : actions/setup-node@v4
23
+ with :
24
+ node-version : ' 20'
25
+ cache : ' pnpm'
26
+
27
+ - name : Get pnpm store directory
28
+ id : pnpm-cache
29
+ shell : bash
30
+ run : |
31
+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
32
+
33
+ - name : Setup pnpm cache
34
+ uses : actions/cache@v3
35
+ with :
36
+ path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
37
+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38
+ restore-keys : |
39
+ ${{ runner.os }}-pnpm-store-
18
40
19
41
- name : Install dependencies
20
- run : npm install
42
+ run : |
43
+ cd backend
44
+ pnpm install --frozen-lockfile
21
45
22
46
- name : Run tests
23
- run : cd backend && npx jest --coverage
47
+ run : |
48
+ cd backend
49
+ pnpm exec jest --coverage --maxWorkers=2 --forceExit
24
50
25
- - name : Upload results to Codecov
51
+ - name : Upload coverage to Codecov
26
52
uses : codecov/codecov-action@v4
27
53
with :
28
- token : ${{ secrets.CODECOV_TOKEN }}
54
+ token : ${{ secrets.CODECOV_TOKEN }}
55
+ directory : ./backend/coverage
56
+ flags : backend
57
+ fail_ci_if_error : true
58
+ verbose : true
You can’t perform that action at this time.
0 commit comments