-
Notifications
You must be signed in to change notification settings - Fork 5
114 lines (89 loc) · 2.47 KB
/
tests.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
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
110
111
112
113
114
name: tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
branches:
- master
jobs:
generic-tests:
strategy:
fail-fast: true
matrix:
node:
- "14"
- "16"
- "18"
runs-on: ubuntu-latest
name: Test on node ${{ matrix.node }}
steps:
- name: Checkout current
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Update npm
run: sudo npm install -g npm@latest
- name: install yarn
run: sudo npm install -g --force yarn
- name: install dependencies
run: yarn --unsafe-perm
- name: run linting
run: yarn lint
- name: run test
run: yarn test
- name: run integration test
run: yarn test:integration
- name: run test coverage
run: yarn test:cov
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
with:
github-token: ${{ github.token }}
path-to-lcov: ./coverage/e2e/lcov.info
flag-name: node-${{ matrix.node }}
parallel: true
support-tests:
strategy:
fail-fast: true
matrix:
supported:
- "@nestjs/{common,core,platform-express,testing}@^7.0.0"
- "@nestjs/{common,core,platform-express,testing}@^8.0.0"
- rxjs@^6.0.0
name: Support for ${{ matrix.supported }}
runs-on: ubuntu-latest
steps:
- name: Checkout current
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Update npm
run: sudo npm install -g npm@latest
- name: install yarn
run: sudo npm install -g --force yarn
- name: install dependencies
run: yarn --unsafe-perm
- name: update dependencies to support ${{ matrix.supported }}
run: yarn add -D ${{ matrix.supported }}
- name: run test
run: yarn test
- name: run integration test
run: yarn test:integration
finish:
needs:
- generic-tests
- support-tests
runs-on: ubuntu-latest
steps:
- name: Coveralls finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ github.token }}
path-to-lcov: ./coverage/e2e/lcov.info
parallel-finished: true