Skip to content

Commit 4c7f7ee

Browse files
committed
Switch CI to GitHub actions
1 parent 6ff5eea commit 4c7f7ee

File tree

6 files changed

+83
-56
lines changed

6 files changed

+83
-56
lines changed

.github/workflows/ci.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Test
2+
on: [push, pull_request]
3+
4+
jobs:
5+
Linux:
6+
name: Test on Linux
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
node: [10, 12, 14]
11+
steps:
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: ${{ matrix.node }}
15+
- uses: actions/checkout@v2
16+
- name: Install Dependencies
17+
run: |
18+
sudo apt update
19+
sudo apt install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev librsvg2-dev
20+
- name: Install
21+
run: npm install --build-from-source
22+
- name: Test
23+
run: npm test
24+
25+
Windows:
26+
name: Test on Windows
27+
runs-on: windows-latest
28+
strategy:
29+
matrix:
30+
node: [10, 12, 14]
31+
steps:
32+
- uses: actions/setup-node@v1
33+
with:
34+
node-version: ${{ matrix.node }}
35+
- uses: actions/checkout@v2
36+
- name: Install Dependencies
37+
run: |
38+
Invoke-WebRequest "http://ftp.gnome.org/pub/GNOME/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip" -OutFile "gtk.zip"
39+
Expand-Archive gtk.zip -DestinationPath "C:\GTK"
40+
Invoke-WebRequest "https://downloads.sourceforge.net/project/libjpeg-turbo/2.0.4/libjpeg-turbo-2.0.4-vc64.exe" -OutFile "libjpeg.exe" -UserAgent NativeHost
41+
.\libjpeg.exe /S
42+
- name: Install
43+
run: npm install --build-from-source
44+
- name: Test
45+
run: npm test
46+
47+
macOS:
48+
name: Test on macOS
49+
runs-on: macos-latest
50+
strategy:
51+
matrix:
52+
node: [10, 12, 14]
53+
steps:
54+
- uses: actions/setup-node@v1
55+
with:
56+
node-version: ${{ matrix.node }}
57+
- uses: actions/checkout@v2
58+
- name: Install Dependencies
59+
run: |
60+
brew update
61+
brew install pkg-config cairo pango libpng jpeg giflib librsvg
62+
- name: Install
63+
run: npm install --build-from-source
64+
- name: Test
65+
run: npm test
66+
67+
Lint:
68+
name: Lint
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/setup-node@v1
72+
with:
73+
node-version: 12
74+
- uses: actions/checkout@v2
75+
- name: Install
76+
run: npm install --ignore-scripts
77+
- name: Lint
78+
run: npm run lint
79+
- name: Lint Types
80+
run: npm run dtslint

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
88
(Unreleased)
99
==================
1010
### Changed
11+
* Switch CI to Github Actions. (Adds Windows and macOS builds.)
1112
### Added
1213
* Export `rsvgVersion`.
1314
### Fixed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# node-canvas
22

3-
[![Build Status](https://travis-ci.org/Automattic/node-canvas.svg?branch=master)](https://travis-ci.org/Automattic/node-canvas)
3+
![Test](https://github.com/Automattic/node-canvas/workflows/Test/badge.svg)
44
[![NPM version](https://badge.fury.io/js/canvas.svg)](http://badge.fury.io/js/canvas)
55

66
node-canvas is a [Cairo](http://cairographics.org/)-backed Canvas implementation for [Node.js](http://nodejs.org).

appveyor.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"scripts": {
2626
"prebenchmark": "node-gyp build",
2727
"benchmark": "node benchmarks/run.js",
28-
"pretest": "standard examples/*.js test/server.js test/public/*.js benchmarks/run.js lib/context2d.js util/has_lib.js browser.js index.js && node-gyp build",
28+
"lint": "standard examples/*.js test/server.js test/public/*.js benchmarks/run.js lib/context2d.js util/has_lib.js browser.js index.js",
2929
"test": "mocha test/*.test.js",
3030
"pretest-server": "node-gyp build",
3131
"test-server": "node test/server.js",

0 commit comments

Comments
 (0)