-
Notifications
You must be signed in to change notification settings - Fork 13
64 lines (55 loc) · 1.63 KB
/
pull-request-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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: PR Tests
# Only run on non-draft PRs, and when PRs are synched
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
branches:
- master
- next
- alpha
- beta
# If the PR has other files, a push w/ just .md or /docs
# files will still cause tests to run
paths-ignore:
- "**.md"
- "docs/**"
jobs:
build:
# Don't run on draft PRs
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
# PRs will run across a wide range of versions & os's
# This takes ~10 minutes, but it ensures we don't get any
# weird regressions
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [14, 16]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
# Npm 7 is needed for workspaces, and it shipped w/ Node 16
# But we want to test on downlevel versions of node so we
# install npm7 directly
- name: Npm 7
run: npm i -g npm@7 --registry=https://registry.npmjs.org
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Test in Chrome
run: npm run test:chrome:ci
# Only run FF on Linux b/c Windows is already really slow
- name: Test in Firefox
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
npm run test:firefox:ci
fi
shell: bash
- name: Test in Node
run: npm run test:node
- uses: codecov/codecov-action@v3
with:
directory: ./coverage