-
Notifications
You must be signed in to change notification settings - Fork 785
90 lines (78 loc) 路 2.29 KB
/
CI.yaml
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
name: CI
on:
- push
- pull_request
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
main-test:
strategy:
matrix:
include:
- name: "Linux: Node 14"
# Includes 'firefox', 'chromium', and more.
# https://github.com/actions/virtual-environments/blob/ubuntu20/20210302.0/images/linux/Ubuntu2004-README.md
os: ubuntu-20.04
node: 14.x
script: npm test
- name: "Linux: Node 12"
os: ubuntu-20.04
node: 12.x
script: npm test
- name: "Linux: Node 10"
os: ubuntu-20.04
node: 10.x
script: npm test
# On Windows, cannot test CLI yet.
# https://github.com/qunitjs/qunit/issues/1359
- name: "Windows: Node 14"
os: windows-latest
node: 14.x
script: npm run test:main
- name: "macOS: Node 14"
os: macos-latest
node: 14.x
script: npm test
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
PUPPETEER_DOWNLOAD_PATH: ~/.puppeteer_download
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
if: ${{ runner.os != 'Windows' }}
with:
path: |
~/.npm
~/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm ci
- name: Tests
run: ${{ matrix.script }}
sm-test:
name: SpiderMonkey
runs-on: ubuntu-20.04
env:
PUPPETEER_DOWNLOAD_PATH: ~/.puppeteer_download
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.npm
~/.puppeteer_download
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Use Node.js 10
uses: actions/setup-node@v2
with:
node-version: 10.x
- name: Install mozjs
run: |
sudo apt-fast install -y libmozjs-68-dev
- run: npm ci
- run: npm run build
- name: Tests
run: js68 test/mozjs.js