Skip to content
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
23 changes: 18 additions & 5 deletions .github/workflows/emerald.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ jobs:
uses: actions/checkout@v5
with:
submodules: recursive

- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
code:
- '**/.rs'
- 'Makefile'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/.sh'
- '*/workflows/emerald.yml'
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
Expand All @@ -46,6 +58,7 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
- name: Run Forge build
run: forge build
if: steps.filter.outputs.code == 'true'
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -54,14 +67,14 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run emerald
run: |
cargo build
./scripts/generate_testnet_config.sh --nodes 3 --testnet-config-dir .testnet --fee-recipient 0x0000000000000000000000000000000000000042
./scripts/generate_testnet_config.sh --nodes 4 --testnet-config-dir .testnet --fee-recipient 0x0000000000000000000000000000000000000042
cargo run --bin emerald -- testnet --home nodes --testnet-config .testnet/testnet_config.toml
ls nodes/*/config/priv_validator_key.json | xargs -I{} cargo run --bin emerald show-pubkey {} > nodes/validator_public_keys.txt
cargo run --bin emerald-utils genesis --public-keys-file ./nodes/validator_public_keys.txt --devnet
docker compose up -d reth0 reth1 reth2 prometheus grafana otterscan
./scripts/add_peers.sh --nodes 3
bash scripts/spawn.bash --nodes 3 --home nodes --no-delay --no-wait
docker compose up -d reth0 reth1 reth2 reth3 prometheus grafana otterscan
./scripts/add_peers.sh --nodes 4
bash scripts/spawn.bash --nodes 4 --home nodes --no-delay --no-wait
if: steps.filter.outputs.code == 'true'

- name: Upload test logs
if: failure()
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we test the Solidity code in the CI?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not in this workflow, except launching the PoA contracts on start.

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ jobs:
uses: actions/checkout@v5
with:
submodules: recursive
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
code:
- '**/.rs'
- 'Makefile'
- '**/Cargo.toml'
- '**/Cargo.lock'
- '**/.sh'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add also test.yml

- '*/workflows/test.yml'
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
Expand All @@ -45,10 +56,12 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
- name: Run Forge build
run: forge build
if: steps.filter.outputs.code == 'true'
- name: Run tests
run: |
cargo nextest run \
--workspace \
--all-features \
--no-fail-fast \
--failure-output final
if: steps.filter.outputs.code == 'true'