forked from ustaxcourt/ef-cms
-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (53 loc) · 1.8 KB
/
client.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
name: Node.js CI - Client Unit Tests
on:
pull_request:
jobs:
Client:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ci_node_total: [4]
ci_node_index: [0, 1, 2, 3]
env:
CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
CI_NODE_INDEX: ${{ matrix.ci_node_index }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.16.1'
- name: Collect Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1
with:
comment_on_pr: false
- name: Install Node Dependencies
run: npm ci
- name: Test Client Unit
run: |
export TESTFILES=$(npx ts-node split-tests-glob.ts -unit)
NODE_INDEX=${{ matrix.ci_node_index }} npm run test:client:unit:ci
- name: Rename coverage to shard coverage
run: |
mkdir -p coverage
cp web-client/coverage/${{ matrix.ci_node_index }}/lcov.info coverage/lcov-${{ matrix.ci_node_index }}.info
cp web-client/coverage/${{ matrix.ci_node_index }}/coverage-final.json coverage/coverage-${{ matrix.ci_node_index }}.json
- uses: actions/upload-artifact@v3
with:
name: coverage-artifacts
path: coverage
check-coverage:
runs-on: ubuntu-latest
needs: [Client]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: coverage-artifacts
path: coverage
- name: Process Coverage
run: npx nyc report --check-coverage --branches 94.56 --functions 97 --lines 97 --statements 97 --reporter lcov --reporter text --reporter clover -t coverage
- uses: geekyeggo/delete-artifact@v1
with:
name: coverage-artifacts
failOnError: false