Skip to content

Commit 66ebdf5

Browse files
committed
ci: migrate from travis to github actions
1 parent e4fde58 commit 66ebdf5

File tree

2 files changed

+49
-25
lines changed

2 files changed

+49
-25
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: Build
27+
run: yarn build
28+
29+
publish:
30+
# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta'
31+
needs: [tests]
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Use Node.js 12
36+
uses: actions/setup-node@v1
37+
with:
38+
node-version: 12.x
39+
- name: Install node_modules
40+
run: yarn install
41+
- name: Build
42+
run: yarn build
43+
- name: Semantic Release (publish to npm)
44+
run: yarn semantic-release
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48+
- name: Send codecov.io stats
49+
run: bash <(curl -s https://codecov.io/bash);

.travis.yml

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

0 commit comments

Comments
 (0)