-
Notifications
You must be signed in to change notification settings - Fork 16
55 lines (51 loc) · 1.3 KB
/
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
48
49
50
51
52
53
54
55
on:
workflow_call:
secrets:
codecov_token:
required: true
name: "Tests"
jobs:
run-tests:
name: Run Tests
runs-on: ubuntu-latest
env:
FOUNDRY_PROFILE: ci
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
- uses: foundry-rs/foundry-toolchain@v1
- run: sudo apt-get install -y lcov
- run: npm ci --no-fund --no-audit
- run: npm run test:coverage
- uses: actions/upload-artifact@v3
with:
name: test-coverage
path: ./coverage/lcov.info
test-build:
name: Test Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.x
- uses: foundry-rs/foundry-toolchain@v1
- run: npm ci --no-fund --no-audit --ignore-scripts
- run: npm run build
coverage:
name: Test Coverage
needs: [run-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download coverage
uses: actions/download-artifact@v3
with:
name: test-coverage
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
verbose: true
token: ${{ secrets.codecov_token }}