-
Notifications
You must be signed in to change notification settings - Fork 208
109 lines (104 loc) · 2.86 KB
/
build+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: Build + Test
on:
- push
- pull_request
jobs:
test_node:
runs-on: ubuntu-22.04
strategy:
matrix:
node: [18, 20, 22]
name: Test on node v${{ matrix.node }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/cache@v3
with:
path: ~/.cache/yarn/
key: ${{ runner.os }}-yarn-node${{ matrix.node }}-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn
- name: Lint
run: yarn lint
- name: Lint Types
run: yarn lint-types
- name: Test Node
run: yarn test-node
test_chrome:
runs-on: ubuntu-22.04
strategy:
matrix:
chrome: [ 'stable', 'beta' ]
name: Test on Chrome (${{ matrix.chrome }})
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- uses: browser-actions/setup-chrome@latest
with:
chrome-version: ${{ matrix.chrome }}
- uses: actions/cache@v3
with:
path: ~/.cache/yarn/
key: ${{ runner.os }}-yarn-node18-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn
- name: Build
run: yarn gulp build-web
- run: sudo apt-get install xvfb
- name: Get Version
run: chrome --version
- name: Test
run: KARMA_BROWSERS=Chrome xvfb-run --auto-servernum yarn test-browser
test_firefox:
runs-on: ubuntu-22.04
strategy:
matrix:
firefox: [ 'latest', 'latest-esr', 'latest-beta' ]
name: Test on Firefox (${{ matrix.firefox }})
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- uses: browser-actions/setup-firefox@latest
with:
firefox-version: ${{ matrix.firefox }}
- uses: actions/cache@v3
with:
path: ~/.cache/yarn/
key: ${{ runner.os }}-yarn-node18-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn
- name: Build
run: yarn gulp build-web
- run: sudo apt-get install xvfb
- name: Get Version
run: firefox --version
- name: Test
run: KARMA_BROWSERS=Firefox xvfb-run --auto-servernum yarn test-browser
test_esm:
runs-on: ubuntu-22.04
strategy:
matrix:
browser: [ 'Chrome', 'Firefox' ]
name: Test ESM (${{ matrix.browser }})
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- uses: actions/cache@v3
with:
path: ~/.cache/yarn/
key: ${{ runner.os }}-yarn-node18-${{ hashFiles('**/yarn.lock') }}
- name: Install
run: yarn
- name: Build
run: yarn gulp build-web-module
- run: sudo apt-get install xvfb
- name: Test
run: USE_ESM=1 KARMA_BROWSERS=${{ matrix.browser }} xvfb-run --auto-servernum yarn test-browser