forked from fabricjs/fabric.js
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (52 loc) · 1.7 KB
/
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
name: '🧪'
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
browser:
name: ${{ matrix.target }} ${{ matrix.suite }} tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
target: [chrome, firefox]
suite: [unit, visual]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Unit tests on Chrome
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build -- -f
- name: Run ${{ matrix.target }} ${{ matrix.suite }} headless test
uses: GabrielBB/xvfb-action@v1
with:
run: npm run test -- -c ${{ matrix.target }} -s ${{ matrix.suite }}
node:
runs-on: ubuntu-latest
name: Node ${{ matrix.node-version }} ${{ matrix.suite }} tests
strategy:
fail-fast: false
matrix:
# For more information see:
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# supported Node.js release schedule: https://nodejs.org/en/about/releases/
node-version: [14.x, 16.x, 18.x]
suite: [unit, visual]
steps:
- uses: actions/checkout@v2
- name: Install node-canvas
run: sudo apt-get install libgif-dev libpng-dev libpango1.0-dev libjpeg8-dev librsvg2-dev libcairo2-dev
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- name: Build
run: npm run build -- -f
- name: Run ${{ matrix.suite }} tests
run: npm run test -- -c node -s ${{ matrix.suite }}