generated from ZeframLou/foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (57 loc) · 1.5 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Tests + Coverage
on:
push:
branches:
- main
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
FOUNDRY_PROFILE: ci
jobs:
check:
strategy:
fail-fast: true
name: Foundry project
runs-on: ubuntu-latest
env:
RPC_URL_MAINNET: ${{ secrets.RPC_URL_MAINNET }}
RPC_URL_GOERLI: ${{ secrets.RPC_URL_GOERLI }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Dependencies
run: |
forge --version
FOUNDRY_PROFILE=ci forge install
id: dependencies
- name: Run Forge build
run: |
forge --version
forge build --sizes
id: build
- name: Run Forge tests
run: |
FOUNDRY_PROFILE=ci forge test -vvv
id: test
- name: Run Forge Formatting Check
run: |
FOUNDRY_PROFILE=ci forge fmt --check
id: fmt
- name: Run Forge Coverage
run: |
FOUNDRY_PROFILE=ci forge coverage --report lcov
id: coverage
- name: Prune lcov report
run: |
sudo apt-get install lcov
lcov --remove ./lcov.info -o ./lcov.info 'script/*' 'test/*'
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
with:
path-to-lcov: lcov.info