-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (51 loc) · 1.6 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
name: Tests
on:
push:
branches:
- main
pull_request:
jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Copy configuration file
run: cp .env.example .env
- name: Import configuration file
run: source .env
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Update Modules
run: yarn sync
- name: Run Tests
run: FOUNDRY_PROFILE=ci yarn test
- name: Run Coverage
run: forge coverage --report lcov
- name: Install lcov
run: sudo apt-get update && sudo apt-get install lcov
- name: Remove unwanted files
run: |
lcov --remove lcov.info 'test/*' -o lcov.info
lcov --remove lcov.info 'contracts/mocks/*' 'contracts/misc/Periphery.sol' -o lcov.info
lcov --remove lcov.info 'contracts/modules/mint/FeeMintModule.sol' -o lcov.info
lcov --remove lcov.info 'contracts/upgradeability/*' -o lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: .
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./lcov.info
name: grappa-coverage
verbose: true