Skip to content

Commit

Permalink
Switch CI to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zbjornson committed Apr 27, 2020
1 parent 6ff5eea commit 4c7f7ee
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 56 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Test
on: [push, pull_request]

jobs:
Linux:
name: Test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 14]
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev librsvg2-dev
- name: Install
run: npm install --build-from-source
- name: Test
run: npm test

Windows:
name: Test on Windows
runs-on: windows-latest
strategy:
matrix:
node: [10, 12, 14]
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
Invoke-WebRequest "http://ftp.gnome.org/pub/GNOME/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip" -OutFile "gtk.zip"
Expand-Archive gtk.zip -DestinationPath "C:\GTK"
Invoke-WebRequest "https://downloads.sourceforge.net/project/libjpeg-turbo/2.0.4/libjpeg-turbo-2.0.4-vc64.exe" -OutFile "libjpeg.exe" -UserAgent NativeHost
.\libjpeg.exe /S
- name: Install
run: npm install --build-from-source
- name: Test
run: npm test

macOS:
name: Test on macOS
runs-on: macos-latest
strategy:
matrix:
node: [10, 12, 14]
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
- name: Install Dependencies
run: |
brew update
brew install pkg-config cairo pango libpng jpeg giflib librsvg
- name: Install
run: npm install --build-from-source
- name: Test
run: npm test

Lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/checkout@v2
- name: Install
run: npm install --ignore-scripts
- name: Lint
run: npm run lint
- name: Lint Types
run: npm run dtslint
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
(Unreleased)
==================
### Changed
* Switch CI to Github Actions. (Adds Windows and macOS builds.)
### Added
* Export `rsvgVersion`.
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# node-canvas

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

node-canvas is a [Cairo](http://cairographics.org/)-backed Canvas implementation for [Node.js](http://nodejs.org).
Expand Down
29 changes: 0 additions & 29 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"scripts": {
"prebenchmark": "node-gyp build",
"benchmark": "node benchmarks/run.js",
"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",
"lint": "standard examples/*.js test/server.js test/public/*.js benchmarks/run.js lib/context2d.js util/has_lib.js browser.js index.js",
"test": "mocha test/*.test.js",
"pretest-server": "node-gyp build",
"test-server": "node test/server.js",
Expand Down

0 comments on commit 4c7f7ee

Please sign in to comment.