Skip to content

Commit 172c3b2

Browse files
committed
add github actions to build and test
1 parent 3a7ed81 commit 172c3b2

File tree

3 files changed

+51
-3
lines changed

3 files changed

+51
-3
lines changed

.github/workflows/build_and_test.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the main branch
7+
on:
8+
push:
9+
branches: [ next ]
10+
pull_request:
11+
branches: [ next ]
12+
13+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
14+
jobs:
15+
# This workflow contains a single job called "build"
16+
build:
17+
# The type of runner that the job will run on
18+
runs-on: ubuntu-latest
19+
20+
# Steps represent a sequence of tasks that will be executed as part of the job
21+
steps:
22+
23+
- uses: actions/checkout@master
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: '12.x'
29+
30+
# Runs a set of commands using the runners shell
31+
- name: Install dependencies
32+
run: yarn install
33+
34+
- name: Build packages
35+
run: yarn build
36+
37+
- name: Test packages
38+
run: yarn test --coverage
39+
40+
- name: Upload to Codecov
41+
uses: codecov/codecov-action@v1
42+
with:
43+
token: ${{ secrets.CODECOV_TOKEN }}
44+
file: ./coverage/clover.xml
45+
fail_ci_if_error: true
46+
directory: ./coverage/lcov-report/

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,6 @@ docs
1414

1515
*.log
1616

17-
package-lock.json
17+
package-lock.json
18+
19+
coverage

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"server": "http-server"
1717
},
1818
"engines": {
19-
"yarn": "1.10.1",
20-
"node": "8.9.0"
19+
"yarn": ">=1 <2",
20+
"node": ">=10"
2121
},
2222
"repository": {
2323
"type": "git",

0 commit comments

Comments
 (0)