-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (42 loc) · 1.15 KB
/
mocha_tests.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
# Runs mocha tests
# Tests are built to run on 5 browser modes (chrome, firefox, webkit/safari, iPhone, Pixel)
# Normally, each test is built to loop through all 5 modes, but if hooks fail, the test will stop
# TODO: Set user/pass secret to send to mocha tests
name: Mocha Tests
defaults:
run:
working-directory: ./tests
on:
push:
branches: [ main, ui-v2 ]
paths:
- '**/*.js'
- '**/*.html'
pull_request:
branches: [ main ]
paths:
- '**/*.js'
- '**/*.html'
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chromium, firefox, webkit, iPhone, pixel]
fail-fast: false
max-parallel: 1 # I think the tests are affected by running in parallel
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install && npx playwright install-deps
- name: Run Mocha tests
run: npm test # alias to "mocha test"
env:
BROWSER: ${{ matrix.browser }}
TEST_ENV: "node"