-
Notifications
You must be signed in to change notification settings - Fork 112
51 lines (42 loc) · 1.07 KB
/
test-webapp.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: Test webapp
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
working-directory: ./webapp
run: npm install
- name: Run tests and generate coverage report
working-directory: ./webapp
run: npm run test:coverage
# - name: Upload test results
# uses: actions/upload-artifact@v3
# with:
# name: test-results
# path: webapp/coverage
- name: Upload coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: webapp/coverage/cobertura-coverage.xml
- name: Publish Cobertura Coverage
uses: 5monkeys/cobertura-action@master
with:
path: webapp/coverage/cobertura-coverage.xml
minimum_coverage: 80
skip_covered: true