Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Foundry CI output tests easier to read on failure #10835

Merged
merged 10 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/*"

martinvol marked this conversation as resolved.
Show resolved Hide resolved
- 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
Loading