-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.04 KB
/
tests-unit.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Jest Unit Tests
on:
push:
branches:
- development
paths:
- 'web/**'
- '.github/workflows/tests-unit.yml'
pull_request:
branches:
- development
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: './web'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.15.0
- name: Enable pnpm
run: corepack enable pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Jest tests
run: pnpm test:unit
- uses: actions/upload-artifact@v4
if: always()
with:
name: jest-coverage
path: web/jest-coverage/
retention-days: 30
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
flags: unittests
name: js-unit-tests
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true