Skip to content
This repository was archived by the owner on Apr 30, 2021. It is now read-only.

Commit 2ae2f78

Browse files
committed
ci: replace travis with GitHub actions
1 parent 7a963de commit 2ae2f78

2 files changed

Lines changed: 63 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: Test
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [10, 12, 13]
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Cache
19+
uses: actions/cache@v1
20+
with:
21+
path: ~/.npm
22+
key: ${{ runner.os }}-nodejs-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.os }}-nodejs
25+
- name: Setup Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
- name: Prepare
30+
run: npm ci
31+
- name: Lint
32+
run: npm run lint
33+
- name: Unit Tests
34+
run: npm run unit-test
35+
- name: Integration Tests
36+
run: npm run integration-test
37+
38+
release:
39+
name: Release Check
40+
runs-on: ubuntu-latest
41+
needs: test
42+
if: github.event_name == 'push'
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v2
46+
- name: Cache
47+
uses: actions/cache@v1
48+
with:
49+
path: ~/.npm
50+
key: ${{ runner.os }}-nodejs-${{ hashFiles('**/package-lock.json') }}
51+
restore-keys: |
52+
${{ runner.os }}-nodejs
53+
- name: Setup Node.js
54+
uses: actions/setup-node@v1
55+
with:
56+
node-version: 12
57+
- name: Prepare
58+
run: npm ci
59+
- name: Release Check
60+
env:
61+
GITHUB_TOKEN: ${{ github.token }}
62+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
63+
run: npx semantic-release

.travis.yml

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

0 commit comments

Comments
 (0)