-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.11 KB
/
web-test.yaml
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
name: Unit Tests
on:
workflow_call:
inputs:
runner:
description: 'Runner name'
required: true
type: string
jobs:
unit-tests:
runs-on: ${{ inputs.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up NodeJS environment
uses: actions/setup-node@v4
- name: Install package dependencies
run: npm install
- name: Execute test cases
run: npm run test
- name: Execute test coverage
run: npm run test:coverage
- name: Archive coverage
uses: actions/upload-artifact@v4
with:
# Upload entire repository
name: coverage-${{ github.run_id }}
path: ${{github.workspace}}/coverage/
retention-days: 14
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: ${{github.workspace}}/coverage/clover.xml
flags: unittests
name: codecov-ui-toolbiox
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}