-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (38 loc) · 1.07 KB
/
test.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
48
49
50
name: Run Tests and Show Coverage Report
on:
push:
paths-ignore:
- '**/README.md'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: setup yarn
run: npm install -g yarn
- name: install deps
run: yarn install --immutable
- name: setup test env
run: cp .env.test .env
- name: setup test infra (db + node + eth rpc)
run: yarn start:test-infra -d
- name: generate db client
run: yarn db:gen
- name: migrate db
run: yarn db:migrate:dev
- name: run tests with coverage
run: yarn test:coverage
- name: upload coverage reports
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverage/lcov.info
fail_ci_if_error: true
- name: dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2