-
Notifications
You must be signed in to change notification settings - Fork 42
50 lines (47 loc) · 1.37 KB
/
ci.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
name: Tests
'on':
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: Node ${{ matrix.node }}
strategy:
matrix:
node:
- '12'
- '14'
- '16'
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: sudo add-apt-repository -y ppa:inkscape.dev/stable && sudo apt-get update && sudo apt-get install -y inkscape graphicsmagick && inkscape --version
- run: npm install
- run: npm test
test-targets:
runs-on: ubuntu-latest
name: ${{ matrix.targets.name }}
strategy:
matrix:
targets:
- name: 'Lint'
target: 'lint'
- name: 'Coverage'
target: 'coverage'
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '14'
- run: sudo add-apt-repository -y ppa:inkscape.dev/stable && sudo apt-get update && sudo apt-get install -y inkscape graphicsmagick && inkscape --version
- run: npm install
- run: npm run ${{ matrix.targets.target }}
- name: Upload coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ matrix.targets.target == 'coverage' }}