-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (45 loc) · 1.23 KB
/
test.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
name: Test
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Install system dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: Install system dependencies (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install pkg-config cairo pango libpng jpeg giflib librsvg
- name: Install Node.js on ${{ matrix.os }}
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
env:
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:/opt/homebrew/lib/pkgconfig
- name: Generate coverage report
run: npm run report:coverage
- name: Send coverage report
uses: codecov/codecov-action@v3.1.1
with:
directory: ./reports/