-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (53 loc) · 1.76 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
56
57
58
59
60
61
62
63
64
65
name: Test
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Foundry build n test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: bgd-labs/action-rpc-env@main
with:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
# we simply use foundry zk for all jobs in this repo
- name: Run Foundry setup
uses: bgd-labs/github-workflows/.github/actions/foundry-setup@main
with:
ZKSYNC: 'true'
- name: Run Forge tests
uses: bgd-labs/github-workflows/.github/actions/foundry-test@main
- name: Run ZK tests
uses: bgd-labs/github-workflows/.github/actions/foundry-test@main
with:
ZKSYNC: true
- name: Run Gas report
uses: bgd-labs/github-workflows/.github/actions/foundry-gas-report@main
- name: Run Lcov report
uses: bgd-labs/github-workflows/.github/actions/foundry-lcov-report@main
- name: Save PR number
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
env:
PR_NUMBER: ${{ github.event.number }}
run: |
mkdir -p ./pr
echo $PR_NUMBER > /tmp/content/pr_number.txt
- uses: actions/upload-artifact@v4
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
with:
name: content
path: /tmp/content
# we let failing tests pass so we can log them in the comment, still we want the ci to fail
- name: Post test
if: ${{ env.testStatus != 0 }}
run: |
echo "tests failed"
exit 1