-
Notifications
You must be signed in to change notification settings - Fork 312
47 lines (38 loc) · 1007 Bytes
/
tests.yml
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
44
45
46
47
name: tests
on:
push:
branches:
- main
tags-ignore:
- '**'
workflow_call:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- run: npm install -g npm@latest
- run: npm ci
- name: Check package.json
run: |
if [[ -n $(git status -s) ]]; then
git status
echo "Error: file tree is not clean; Likely needs npm install"
echo "Run `npm install` and commit to resolve"
exit 1
fi
- name: Run lint
run: npm run lint
- name: Run typecheck
run: npm run typecheck
- name: Check for circular dependencies
run: npm run madge
- name: Run tests
run: npm run lerna run test --stream --parallel -- -- --coverage
- name: Upload test coverage
uses: codecov/codecov-action@v1