Skip to content

Commit

Permalink
Make Foundry CI output tests easier to read on failure (#10835)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvol authored Dec 19, 2023
1 parent e9b7eb3 commit 479640b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions .github/workflows/protocol_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,43 @@ jobs:
- name: Compile Contracts
run: forge compile

- name: Run tests
- name: Run tests common
# can't use gas limit because some setUp function use more than the limit
run: forge test -vvv # --block-gas-limit 20000000
run: forge test -vvv --match-path "test-sol/common/*" # --block-gas-limit 20000000

- name: Run tests compatibility
if: success() || failure()
run: forge test -vvv --block-gas-limit 20000000 --match-path "test-sol/compatibility/*"

- name: Run tests governance/network
if: success() || failure()
run: forge test -vvv --block-gas-limit 20000000 --match-path "test-sol/governance/network/*"

- name: Run tests governance/validators
if: success() || failure()
run: forge test -vvv --block-gas-limit 20000000 --match-path "test-sol/governance/validators/*"

- name: Run tests governance/voting
# can't use gas limit because some setUp function use more than the limit
if: success() || failure()
run: forge test -vvv --match-path "test-sol/governance/voting/*" # --block-gas-limit 20000000

- name: Run tests stability
if: success() || failure()
run: forge test -vvv --block-gas-limit 20000000 --match-path "test-sol/stability/*"

- name: Run tests identity
if: success() || failure()
run: forge test -vvv --match-path "test-sol/identity/*"

- name: Fail if there are tests without folder
if: success() || failure()
run: |
if ls test-sol | grep -qi '\.t\.sol'; then
echo "All tests should be in a folder"
exit 1
fi
- name: Run Everything just in case something was missed
# can't use gas limit because some setUp function use more than the limit
run: forge test -vvv
File renamed without changes.

0 comments on commit 479640b

Please sign in to comment.