-
Notifications
You must be signed in to change notification settings - Fork 43
72 lines (63 loc) · 2.35 KB
/
app-codecov-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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: APP (React 18)
on:
push:
branches: [dev]
paths:
- 'frontend/**' # Triggers on changes to files in the frontend/ directory.
- '!frontend/cypress/**' # Will not trigger on changes to the following.
- '!frontend/cypress.config.*'
- '!frontend/.eslintrc.*'
- '!frontend/.prettierrc.*'
- '!frontend/Dockerfile*'
- '!frontend/nginx.conf'
- '!frontend/vite.config.*'
pull_request:
types: [opened, synchronize] # Triggered by opened or changed pull requests.
branches: [dev]
paths:
- 'frontend/**' # Triggers on changes to files in the frontend/ directory.
- '!frontend/cypress/**' # Will not trigger on changes to the following.
- '!frontend/cypress.config.*'
- '!frontend/.eslintrc.*'
- '!frontend/.prettierrc.*'
- '!frontend/Dockerfile*'
- '!frontend/nginx.conf'
- '!frontend/vite.config.*'
- '.github/workflows/app-codecov-test.yml'
jobs:
build:
runs-on: ubuntu-latest
env:
CI: true
working-directory: ./frontend
codeCov-token: ${{ secrets.CodeCov }}
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm i
working-directory: ${{env.working-directory}}
# - run: npm run build --if-present
# working-directory: ${{env.working-directory}}
- run: npm run coverage
working-directory: ${{env.working-directory}}
- name: Codecov
uses: codecov/codecov-action@v3
with:
# User defined upload name. Visible in Codecov UI
name: PIMS
# Repository upload token - get it from codecov.io. Required only for private repositories
token: ${{env.codeCov-token}}
# Path to coverage file to upload
file: ${{env.working-directory}}/coverage/coverage-final.json
# Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)
flags: unittests
# Environment variables to tag the upload with (e.g. PYTHON | OS,PYTHON)
env_vars: javascript
# Specify whether or not CI build should fail if Codecov runs into an error during upload
fail_ci_if_error: true