Skip to content

Commit 2b15890

Browse files
authored
ci: setup github actions (#1249)
1 parent 990026c commit 2b15890

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

.editorconfig

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ root = true
66
charset = utf-8
77
indent_size = 4
88
indent_style = space
9-
endofline = lf
9+
end_of_line = lf
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
1212

1313
[*.json]
1414
indent_size = 2
15+
16+
[*.yml]
17+
indent_size = 2

.github/workflows/ci.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
name: Test on ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest, macOS-latest]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Read .nvmrc
24+
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
25+
id: nvm
26+
27+
- name: Use Node.js (.nvmrc)
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: ${{ steps.nvm.outputs.NVMRC }}
31+
32+
- name: Install dependencies
33+
run: npm install
34+
35+
- name: Run linters
36+
run: npm run lint
37+
38+
- name: Run Build
39+
run: npm run build
40+
41+
- name: Run test
42+
run: npm test

0 commit comments

Comments
 (0)