-
Notifications
You must be signed in to change notification settings - Fork 11
67 lines (58 loc) · 1.66 KB
/
echidna.yaml
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
name: "Echidna"
env:
FOUNDRY_PROFILE: "ci"
on:
workflow_dispatch:
pull_request:
push:
branches:
- "main"
- "develop"
jobs:
get_echidna_test_names:
name: Get Echidna test names
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate matrix with all test names from the test/echidna directory
id: set-matrix
run: |
echo "::set-output name=matrix::$(ls test/echidna | sed 's/.sol//' | jq -R -s -c 'split("\n")[:-1]')"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
run_echidna_tests:
needs: get_echidna_test_names
name: Run echidna tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
contract: ${{ fromJson(needs.get_echidna_test_names.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "yarn"
node-version: "20"
- name: "Install the Node.js dependencies"
run: "yarn install --immutable"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: "Build for echidna"
run: |
forge build --build-info --skip \
"test/fork/**/*" \
"test/integration/**/*" \
"test/unit/**/*" \
"test/utils/**/*" \
"contracts/**/*"
- name: "Run Echidna"
uses: crytic/echidna-action@v2
with:
files: .
contract: ${{ matrix.contract }}
config: echidna.yaml
test-mode: assertion