generated from idrinth-api-bench/project-defaults
-
Notifications
You must be signed in to change notification settings - Fork 5
109 lines (109 loc) · 2.62 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: TEST
on:
push:
branches:
- the-one
paths:
- '**.ts'
- '**.js'
- '**.json'
- '.github/workflows/test.yml'
pull_request:
branches:
- the-one
paths:
- '**.ts'
- '**.js'
- '**.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/setup-node@v4.1.0
with:
node-version: ${{ matrix.version }}
cache: 'npm'
cache-dependency-path: |
package-lock.json
- run: npm ci
- run: npm run language
- 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:
version:
- 20
- 21
- 22
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.version }}
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.version }}
cache: 'npm'
cache-dependency-path: |
package-lock.json
- run: npm ci
- run: npm run language
- run: npm run integration
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: integration ${{ env.CURRENT_NODE_VERSION }}
property:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- 20
- 21
- 22
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.version }}
uses: actions/setup-node@v4.1.0
with:
node-version: ${{ matrix.version }}
cache: 'npm'
cache-dependency-path: |
package-lock.json
- run: npm ci
- run: npm run language
- run: npm run property
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: property-test-${{ matrix.version }}
end:
runs-on: ubuntu-latest
needs:
- unit-test
- integration
- property
steps:
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true