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

CI Check genesis files #903

Merged
merged 12 commits into from
Jul 19, 2024
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
18 changes: 18 additions & 0 deletions .github/scripts/check_genesis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Run make command
make genesis

sleep 1

# Check if script generates different genesis
git diff --exit-code ./resources/

if [ $? -ne 0 ]; then
echo "Differences found in genesis files."
exit 1
fi

echo "All directories are identical."

exit 0
26 changes: 26 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,3 +423,29 @@ jobs:
cd crates/evm/src/evm/system_contracts
forge test -vvv
id: test
check_genesis_files:
strategy:
fail-fast: true

name: Check Genesis Files
runs-on: ubicloud-standard-2
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Run check_genesis.sh
run: ./.github/scripts/check_genesis.sh
shell: bash

3 changes: 2 additions & 1 deletion crates/evm/src/evm/system_contracts/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Compiler files
cache/
out/
state/
state/*.json


# Ignores development broadcast logs
!/broadcast
Expand Down
Empty file.
Loading