-
Notifications
You must be signed in to change notification settings - Fork 9
64 lines (54 loc) · 1.74 KB
/
tests.yml
File metadata and controls
64 lines (54 loc) · 1.74 KB
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
name: Tests
on:
push:
branches: [ main, staging, develop ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FOUNDRY_PROFILE: default
POLYGON_MAINNET_RPC: ${{ secrets.POLYGON_MAINNET_RPC }}
ETHEREUM_MAINNET_RPC: ${{ secrets.ETHEREUM_MAINNET_RPC }}
ARBITRUM_MAINNET_RPC: ${{ secrets.ARBITRUM_MAINNET_RPC }}
ARBITRUM_SEPOLIA_RPC: ${{ secrets.ARBITRUM_SEPOLIA_RPC }}
OPBASE_MAINNET_RPC: ${{ secrets.OPBASE_MAINNET_RPC }}
OPBASE_SEPOLIA_RPC: ${{ secrets.OPBASE_SEPOLIA_RPC }}
FIX_BLOCK_ARBITRUM_MAINNET: false
BLOCK_NUMBER_ARBITRUM_MAINNET: 268596680
FIX_BLOCK_ARBITRUM_SEPOLIA: false
BLOCK_NUMBER_ARBITRUM_SEPOLIA: 92996012
FIX_BLOCK_OPBASE_MAINNET: false
BLOCK_NUMBER_OPBASE_MAINNET: 25666192
FIX_BLOCK_OPBASE_SEPOLIA: false
BLOCK_NUMBER_OPBASE_SEPOLIA: 21176690
jobs:
test:
strategy:
fail-fast: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
submodules: recursive
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/checkout@v4
if: github.event_name == 'push'
with:
fetch-depth: 0
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Dependencies
run: forge install
- name: Setup .env from env.example
run: cp .env.example .env
- name: Build Contracts & Run Tests
run: |
NO_COLOR=1 forge test -vvv 2>&1 | tee -a $GITHUB_STEP_SUMMARY
test_exit_status=${PIPESTATUS[0]}
exit $test_exit_status