generated from idrinth-api-bench/project-defaults
-
Notifications
You must be signed in to change notification settings - Fork 13
90 lines (90 loc) · 2.03 KB
/
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: TEST
on:
push:
branches:
- the-one
paths:
- '**.ts'
- '**.js'
- '**.tsx'
- '**.json'
- '.github/workflows/test.yml'
pull_request:
branches:
- the-one
paths:
- '**.ts'
- '**.js'
- '**.tsx'
- '**.json'
- '.github/workflows/test.yml'
jobs:
unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- 20
- 21
- 22
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{matrix.version}}
uses: actions/[email protected]
with:
node-version: ${{matrix.version}}
cache: 'npm'
cache-dependency-path: |
package-lock.json
- run: npm ci
- run: npm run language
- run: npm run contributors
- run: npm run test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: unit-test-${{ env.CURRENT_NODE_VERSION }}
integration:
runs-on: ubuntu-latest
strategy:
matrix:
part:
- 0
- 1
- 2
- 3
- 4
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/[email protected]
with:
node-version: latest
cache: 'npm'
cache-dependency-path: |
package-lock.json
- run: npm ci
- run: npm run build
- run: npm run e2e
env:
SPLIT: 5
SPLIT_INDEX: ${{ matrix.part }}
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: integration-${{ env.CURRENT_NODE_VERSION }}
end:
runs-on: ubuntu-latest
needs:
- unit-test
- integration
steps:
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true