-
Notifications
You must be signed in to change notification settings - Fork 332
47 lines (39 loc) · 1.12 KB
/
testinparallel.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
name: Run Parallel
on:
push:
pull_request:
types: [opened, reopened]
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get list of .t.sol files in src/test
run: |
FILES=$(find src/test -type f -name '*.t.sol' | sed 's#src/test/##' | jq -R -s -c 'split("\n")[:-1]')
echo "::set-output name=matrix::$FILES"
id: set-matrix
run-tests:
needs: prepare
runs-on: ubuntu-latest
strategy:
matrix:
file: ${{fromJson(needs.prepare.outputs.matrix)}}
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install forge dependencies
run: forge install
- name: Run forge test for the file
run: forge test --match-path src/test/${{ matrix.file }} --no-match-contract FFI
env:
RPC_MAINNET: ${{ secrets.RPC_MAINNET }}
CHAIN_ID: ${{ secrets.CHAIN_ID }}