-
Notifications
You must be signed in to change notification settings - Fork 2k
50 lines (41 loc) · 1.79 KB
/
continuous-integration.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
# Based on https://github.com/actions/starter-workflows/blob/master/ci/node.js.yml
name: Build and Test
on: [push, pull_request]
jobs:
ci:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, macos-latest, windows-latest]
node-version: [12.x, 14.x, 16.x, 18.x, 20.x]
# The 'setup-node' action has become unable to locate versions for macos ("darwin") on arm64
# for some reason. Processor architecture shouldn't affect any of our testing, so we can pin
# this for now.
architecture: [x64]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'package-lock.json'
architecture: ${{ matrix.architecture }}
- run: npm ci
# Ensure that we can still build in the current version of Node
- run: node ./bin/cake build:except-parser
- run: node ./bin/cake build:parser
# Build twice to ensure that the latest build of the compiler can still build itself
- run: node ./bin/cake build:except-parser
- run: node ./bin/cake build:parser
# Build the browser compiler for the headless browser test
- run: node ./bin/cake build:browser
# Build test.html, so that test:browser uses the latest tests
- run: node ./bin/cake doc:test
# Check that the git diff is clean, to ensure that the updated build output was committed
- run: git diff --exit-code
# Test
- run: node ./bin/cake test
- run: node ./bin/cake test:browser || node ./bin/cake test:browser || node ./bin/cake test:browser
- run: node ./bin/cake test:browser:node
- run: node ./bin/cake test:integrations