Skip to content

Commit

Permalink
build: replace AppVeyor/Travis CI with GitHub Actions (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
malept committed Nov 25, 2019
1 parent 1b7c3a1 commit a99633a
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 45 deletions.
27 changes: 0 additions & 27 deletions .appveyor.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
branches:
- master
tags:
- v[0-9]+.[0-9]+.[0-9]+*
pull_request:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
node-version: [8.x, 10.x, 12.x]

steps:
- name: Fix git checkout line endings
run: git config --global core.autocrlf input
- uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install
run: npm install
- name: Lint
run: npm run lint
- name: Testsuite
run: npm run coverage
- name: Test TypeScript definition
run: npm run tsd
- name: Codecov
run: npm run codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
},
"scripts": {
"ava": "ava test/index.js",
"ci": "npm run lint && npm run coverage && npm run tsd",
"codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"coverage": "nyc ava test/index.js",
"lint": "eslint .",
Expand Down

0 comments on commit a99633a

Please sign in to comment.