Skip to content

Commit

Permalink
Merge pull request #39 from errorception/gh-actions
Browse files Browse the repository at this point in the history
Switch to GitHub Actions CI.
  • Loading branch information
rakeshpai committed Sep 30, 2019
2 parents a36b31b + 97a5384 commit 535ecdc
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 27 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Tests
on: [push, pull_request]

jobs:
test:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [6, 8.16.1, 10, 12]
os: [ubuntu-latest, windows-latest]

steps:
- name: Clone repository
uses: actions/checkout@v1

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- run: node --version
- run: npm --version

- name: Install npm dependencies
run: npm install # switch to `npm ci` when Node.js 6.x is dropped
env:
CI: true

- name: Run tests with coverage
run: npm run test:cov
if: startsWith(matrix.os, 'ubuntu')

- name: Run tests without coverage
run: npm test
if: startsWith(matrix.os, 'windows')

- name: Run Coveralls
run: npm run coveralls
if: matrix.node == 10 && startsWith(matrix.os, 'ubuntu') && github.repository == 'errorception/staticify' && github.event_name == 'push'
env:
COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}"
COVERALLS_GIT_BRANCH: "${{ github.ref }}"
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# staticify

[![NPM version](https://img.shields.io/npm/v/staticify.svg)](https://www.npmjs.com/package/staticify)
[![Build Status](https://img.shields.io/travis/errorception/staticify/master.svg?label=Build%20Status)](https://travis-ci.org/errorception/staticify)
[![Build Status](https://github.com/errorception/staticify/workflows/Tests/badge.svg)](https://github.com/errorception/staticify/actions)
[![Coverage Status](https://img.shields.io/coveralls/github/errorception/staticify/master.svg)](https://coveralls.io/github/errorception/staticify?branch=master)
[![dependencies Status](https://img.shields.io/david/errorception/staticify.svg)](https://david-dm.org/errorception/staticify)
[![devDependencies Status](https://img.shields.io/david/dev/errorception/staticify.svg)](https://david-dm.org/errorception/staticify?type=dev)
Expand Down

0 comments on commit 535ecdc

Please sign in to comment.