Skip to content

Commit 3e42d16

Browse files
committed
ci: add build, test and coverage jobs
1 parent 3e2e92a commit 3e42d16

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

.github/workflows/build.yml

+38-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,45 @@ jobs:
2323
run: npm run lint-es
2424
- name: Check formatting
2525
run: npm run format:check
26+
build-and-test:
27+
need: lint
28+
runs-on: ubuntu-latest
29+
timeout-minutes: 5
30+
steps:
31+
- name: Checkout
32+
uses: actions/[email protected]
33+
- name: Setup node
34+
uses: actions/[email protected]
35+
with:
36+
node-version: 12
37+
- name: Install project
38+
run: npm ci --ignore-scripts
39+
- name: Build
40+
run: npm run build
41+
- name: Test
42+
run: npm run test:ci
43+
code-coverage:
44+
need: build
45+
runs-on: ubuntu-latest
46+
timeout-minutes: 5
47+
steps:
48+
- name: Checkout
49+
uses: actions/[email protected]
50+
- name: Setup node
51+
uses: actions/[email protected]
52+
with:
53+
node-version: 12
54+
- name: Install project
55+
run: npm ci --ignore-scripts
56+
- name: Test
57+
run: npm run test:ci
58+
- name: Upload coverage to Codecov
59+
uses: codecov/[email protected]
60+
with:
61+
token: ${{ secrets.CODECOV_TOKEN }}
62+
file: ./coverage/cobertura-coverage.xml
2663
release:
27-
needs: lint
64+
needs: [build, code-coverage]
2865
runs-on: ubuntu-latest
2966
# GitHub API requests can easy take a couple of seconds and the release can
3067
# make lots of API requests when a release has a lot of commits. If every

0 commit comments

Comments
 (0)