Skip to content

Commit 420d712

Browse files
committed
ci: migrate from travis to github actions
1 parent 7102a72 commit 420d712

File tree

2 files changed

+49
-27
lines changed

2 files changed

+49
-27
lines changed

.github/workflows/nodejs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on: [push, pull_request]
7+
8+
jobs:
9+
tests:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [10.x, 12.x, 14.x]
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js ${{ matrix.node-version }}
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
- name: Install node_modules
21+
run: yarn
22+
- name: Test & lint
23+
run: yarn test
24+
env:
25+
CI: true
26+
- name: Send codecov.io stats
27+
if: matrix.node-version == '12.x'
28+
run: bash <(curl -s https://codecov.io/bash) || echo ''
29+
30+
publish:
31+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta'
32+
needs: [tests]
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Use Node.js 12
37+
uses: actions/setup-node@v1
38+
with:
39+
node-version: 12.x
40+
- name: Install node_modules
41+
run: yarn install
42+
- name: Build
43+
run: yarn build
44+
- name: Semantic Release (publish to npm)
45+
run: yarn semantic-release
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
49+

.travis.yml

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

0 commit comments

Comments
 (0)