Skip to content

Commit

Permalink
feat(ci): use GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
camfou committed Dec 8, 2019
1 parent be3cb53 commit 1f9b4f2
Show file tree
Hide file tree
Showing 5 changed files with 6,608 additions and 214 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Node CI
on: [push]
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci
npm test
npm run lint
npm run cover
env:
CI: true
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release:
name: Release master
runs-on: ubuntu-latest
needs: [build]
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ npm-debug.log
.idea/
*.iml
coverage/
.nyc_output/
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 1f9b4f2

Please sign in to comment.