-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (36 loc) · 967 Bytes
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build and run unit tests
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
name: Build
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: install node
uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://npm.pkg.github.com'
- name: install dependencies
env:
GITHUB_PACKAGES_PAT: ${{ secrets.GITHUB_TOKEN }}
run: yarn --immutable
- name: run build
run: yarn build
- name: run eslint
run: yarn lint
- name: run tests
run: yarn test --coverage
- name: Codecov
uses: codecov/[email protected]
with:
directory: ./coverage
fail_ci_if_error: true