-
Notifications
You must be signed in to change notification settings - Fork 62
94 lines (80 loc) · 2.12 KB
/
node.js.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
name: Node CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_call:
secrets:
BROWSERSTACK_USERNAME:
required: true
BROWSERSTACK_ACCESS_KEY:
required: true
jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
env:
CI: true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Build
run: npm ci
- name: Run unit tests
run: npm test
integration:
# integration tests from "js" package fail if they are executed at the same time
concurrency: js-concurrency
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14.x'
cache: 'npm'
cache-dependency-path: |
package-lock.json
packages/js/test/integration/package-lock.json
- name: Build
run: |
npm ci
cd packages/js/test/integration
npm ci
- name: Run integration tests
env:
CI: true
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
run: |
cd packages/js
npm run test:integration
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '14.x'
cache: 'npm'
cache-dependency-path: |
package-lock.json
packages/js/examples/aws-lambda-typescript/package-lock.json
packages/vue/examples/vue2/package-lock.json
packages/vue/examples/vue3/package-lock.json
packages/react-native/example/package-lock.json
- name: Build
run: npm ci
- name: Run lint checks
run: npm run lint