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

Commit db2e433

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

2 files changed

Lines changed: 64 additions & 10 deletions

File tree

.github/workflows/ci.yml

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

.travis.yml

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

0 commit comments

Comments
 (0)