Skip to content

Commit 9896a51

Browse files
committed
ci: run linter and tests before release
1 parent d19ee2e commit 9896a51

File tree

3 files changed

+41
-4
lines changed

3 files changed

+41
-4
lines changed

.github/workflows/lint.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
name: Run linter
44

55
on:
6-
push:
7-
branches: [ master ]
86
pull_request:
97
branches: [ master ]
108

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,47 @@ on:
44
branches:
55
- master
66
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Use Node.js 12
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: '12'
17+
18+
- run: npm ci
19+
20+
- run: npm run lint
21+
22+
test:
23+
runs-on: ubuntu-latest
24+
25+
strategy:
26+
matrix:
27+
node-version: [10.x, 12.x, 14.x]
28+
29+
steps:
30+
- uses: actions/checkout@v2
31+
32+
- name: Use Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v1
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
37+
- run: npm ci
38+
39+
- run: npm run test:coverage
40+
41+
- name: Coveralls GitHub Action
42+
uses: coverallsapp/[email protected]
43+
with:
44+
github-token: ${{ secrets.GITHUB_TOKEN }}
45+
parallel: true
46+
flag-name: ${{ matrix.node-version }}
47+
748
release:
849
name: Release
950
runs-on: ubuntu-latest

.github/workflows/test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
name: Run tests
44

55
on:
6-
push:
7-
branches: [ master ]
86
pull_request:
97
branches: [ master ]
108

0 commit comments

Comments
 (0)