-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (53 loc) · 1.45 KB
/
build.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
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
node-version: ['16.x', '18.x', '20.x']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install
run: npm ci
- name: Lint
if: matrix.node-version == '20.x'
run: npm run lint
- name: Types
if: matrix.node-version == '20.x'
run: tsc
- name: Prettier
if: matrix.node-version == '20.x'
run: npm run prettier:check
- name: Test
run: npm test
# N.B.: The selenium server cannot run as a GitHub Actions "service" as
# the tests need to mount local data into the container.
- name: Start Selenium Server
run: |
docker run -d -p 4444:4444 \
--shm-size="2g" \
--name selenium_server \
-v ${PWD}:${PWD} \
selenium/standalone-firefox:4.16.1-20231219
- name: Wait for Selenium
run: sleep 5
shell: bash
- name: Integration
run: npm run test:integration
- name: Stop Selenium Server
if: always()
run: docker stop selenium_server && docker rm selenium_server