Skip to content

Commit d841c0b

Browse files
authored
Merge pull request #5 from camfou/travis_to_github_actions
Replace Travis build by Github action
2 parents 49776e5 + 7a0ad9c commit d841c0b

4 files changed

Lines changed: 8214 additions & 1886 deletions

File tree

.github/workflows/nodejs.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Node CI
2+
on: [push]
3+
jobs:
4+
build:
5+
name: Build and test
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
node-version: [10.x, 12.x]
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Use Node.js ${{ matrix.node-version }}
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: ${{ matrix.node-version }}
16+
- name: npm install, build, and test
17+
run: |
18+
npm ci
19+
npm test
20+
npm run lint
21+
npm run cover
22+
env:
23+
CI: true
24+
- name: Coveralls
25+
uses: coverallsapp/github-action@master
26+
with:
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
release:
29+
name: Release master
30+
runs-on: ubuntu-latest
31+
needs: [build]
32+
if: github.ref == 'refs/heads/master'
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v1
36+
- name: Setup Node.js
37+
uses: actions/setup-node@v1
38+
with:
39+
node-version: 12
40+
- name: Install dependencies
41+
run: npm ci
42+
- name: Release
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
run: npx semantic-release

.travis.yml

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

0 commit comments

Comments
 (0)