Skip to content

Commit 4f7774a

Browse files
authored
ci: replace travis with github action (#36)
1 parent 657b107 commit 4f7774a

File tree

3 files changed

+39
-22
lines changed

3 files changed

+39
-22
lines changed

.github/workflows/node-ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Node.js CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Use Node.js
12+
uses: actions/setup-node@v1
13+
with:
14+
node-version: '12.x'
15+
- run: yarn
16+
- run: yarn lint
17+
- run: yarn format:check
18+
- run: yarn test --coverage --verbose
19+
- run: yarn build
20+
- run: git diff --exit-code --name-only
21+
- uses: codecov/codecov-action@v1

.github/workflows/node-publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Node.js Package
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
# Setup .npmrc file to publish to npm
11+
- uses: actions/setup-node@v2
12+
with:
13+
node-version: '12.x'
14+
registry-url: 'https://registry.npmjs.org'
15+
- run: yarn
16+
- run: npm publish
17+
env:
18+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.travis.yml

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

0 commit comments

Comments
 (0)