Skip to content

Commit bb74281

Browse files
committed
Setup GitHub actions to run tests and lint
1 parent 9b84418 commit bb74281

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: main
2+
on: [push, pull_request]
3+
jobs:
4+
build-and-test:
5+
strategy:
6+
matrix:
7+
node:
8+
- '10'
9+
- '12'
10+
- '14'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@v2
15+
16+
- name: Setup node
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: ${{ matrix.node }}
20+
21+
- name: Download deps
22+
uses: bahmutov/npm-install@v1
23+
24+
- name: Build sources
25+
run: npm run build
26+
27+
- name: Run tests
28+
run: npm run test
29+
30+
lint:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout repo
34+
uses: actions/checkout@v2
35+
36+
- name: Setup node
37+
uses: actions/setup-node@v1
38+
with:
39+
node-version: '14.x'
40+
41+
- name: Download deps
42+
uses: bahmutov/npm-install@v1
43+
44+
- name: Run lint
45+
run: npm run lint

0 commit comments

Comments
 (0)