Skip to content

Commit b638900

Browse files
build: remove Travis in favor of GH Actions
1 parent 4fe1ca3 commit b638900

File tree

5 files changed

+958
-948
lines changed

5 files changed

+958
-948
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CD
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
name: Publish to NPM
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v1
11+
- uses: actions/setup-node@v1
12+
with:
13+
registry-url: https://registry.npmjs.org
14+
- run: npm ci --ignore-scripts
15+
- run: npm run prettier:check
16+
- run: npm run lint:check
17+
- run: npm run test:ci
18+
- run: npm run build
19+
- run: cp LICENSE build/LICENSE
20+
- run: cp README.md build/README.md
21+
- run: cp package.json build/package.json
22+
- run: npm publish ./build
23+
env:
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
on: push
3+
jobs:
4+
checks:
5+
name: Linters
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v1
9+
- uses: actions/setup-node@v1
10+
- run: npm ci --ignore-scripts
11+
- run: npm run prettier:check
12+
- run: npm run lint:check
13+
tests:
14+
name: Tests
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: [8.x, 10.x, 12.x, 14.x]
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Setting up Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
- run: npm ci --ignore-scripts
24+
- run: npm run test:ci
25+
- run: npm install codecov -g
26+
- run: codecov -f ./coverage/clover.xml -t ${{ secrets.CODECOV_TOKEN }}
27+
build:
28+
name: Build
29+
needs: [tests, checks]
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v1
33+
- uses: actions/setup-node@v1
34+
- run: npm ci --ignore-scripts
35+
- run: npm run build

.github/workflows/nodejs.yml

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

.travis.yml

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

0 commit comments

Comments
 (0)