Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
77 changes: 77 additions & 0 deletions .github/workflows/pr-main_l1_l2_dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: L1 & L2 Dev
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is clearly an L2 tests, so I would call it L2 Dev

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 3407671.

on:
push:
branches: ["main"]
merge_group:
pull_request:
branches: ["**"]

permissions:
contents: read
actions: write

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
DOCKER_ETHREX_WORKDIR: /usr/local/bin

jobs:
integration-test-l1-l2-dev:
name: Integration Test
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Free Disk Space
uses: ./.github/actions/free-disk

- name: Setup Rust Environment
uses: ./.github/actions/setup-rust

- name: Install solc
uses: lambdaclass/get-solc@master
with:
version: v0.8.29
token: ${{ secrets.GITHUB_TOKEN || '' }}

- name: Start ethrex
run: |
cargo run --release --bin ethrex -F l2,l2-sql -- l2 --dev \
--block-producer.base-fee-vault-address 0x000c0d6b7c4516a5b274c51ea331a9410fe69127 \
--block-producer.operator-fee-vault-address 0xd5d2a85751b6F158e5b9B8cD509206A865672362 \
--block-producer.l1-fee-vault-address 0x45681AE1768a8936FB87aB11453B4755e322ceec \
--block-producer.operator-fee-per-gas 1000000000 \
--no-monitor 2>&1 | tee /tmp/ethrex.log &
- name: Wait for ethrex L2
run: |
for i in {1..100}; do
echo "Checking if ethrex L2 is ready... (attempt $i)"
if nc -z localhost 3900; then
echo "ProofCoordinator ready!"
exit 0
fi
sleep 15
done
echo "ProofCoordinator not ready in time"
exit 1
- name: Init prover
run: |
target/release/ethrex l2 prover --proof-coordinators http://localhost:3900 2>&1 | tee /tmp/prover.log &
- name: Show ENVs
run: |
cat .env
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

This step attempts to display the contents of .env file, but when using --dev mode (as in line 42), no .env file is created. The --dev flag handles configuration internally without generating an .env file. This step will fail with "No such file or directory". Consider removing this step or checking if the file exists before attempting to display it.

Suggested change
cat .env
if [ -f .env ]; then cat .env; else echo ".env file does not exist"; fi

Copilot uses AI. Check for mistakes.
- name: Run test
run: |
cd crates/l2
tail -n 100 -f /tmp/ethrex.log &
tail -n 100 -f /tmp/prover.log &
export $(shell cat .env | xargs); \
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The syntax $(shell cat .env | xargs) is Makefile syntax, not valid Bash syntax. In Bash, this should be $(cat .env 2>/dev/null | xargs) or similar. Additionally, this references a .env file that doesn't exist when using --dev mode. Since the --dev flag handles all configuration internally, this export statement is likely unnecessary and will cause the workflow to fail.

Suggested change
export $(shell cat .env | xargs); \

Copilot uses AI. Check for mistakes.
PROPOSER_COINBASE_ADDRESS=0x0007a881CD95B1484fca47615B64803dad620C8d \
cargo test l2 --release -- --nocapture --test-threads=1
70 changes: 1 addition & 69 deletions .github/workflows/pr-main_l2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -507,78 +507,15 @@
cd crates/l2
make state-diff-test

integration-test-l2-dev:
name: Integration Test - L2 Dev
runs-on: ubuntu-latest
needs: detect-changes
if: ${{ needs.detect-changes.outputs.run_tests == 'true' }}
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Free Disk Space
uses: ./.github/actions/free-disk

- name: Setup Rust Environment
uses: ./.github/actions/setup-rust

- name: Install solc
uses: lambdaclass/get-solc@master
with:
version: v0.8.29
token: ${{ secrets.GITHUB_TOKEN || '' }}

- name: Start ethrex
run: |
cd crates/l2
ETHREX_NO_MONITOR=true make init-l2-dev 2>&1 | tee /tmp/ethrex.log &

- name: Wait for ethrex l2
run: |
for i in {1..100}; do
echo "Checking if ethrex l2 is ready... (attempt $i)"
if nc -z localhost 3900; then
echo "ProofCoordinator ready!"
exit 0
fi
sleep 15
done
echo "ProofCoordinator not ready in time"
exit 1

- name: Init prover
run: |
target/release/ethrex l2 prover --proof-coordinators http://localhost:3900 2>&1 | tee /tmp/prover.log &

- name: show envs
run: |
cat crates/l2/.env

- name: Run test
run: |
cd crates/l2
tail -n 100 -f /tmp/ethrex.log &
tail -n 100 -f /tmp/prover.log &
export $(shell cat .env | xargs); \
INTEGRATION_TEST_SKIP_BASE_FEE_VAULT_CHECK=true \
PROPOSER_COINBASE_ADDRESS=0x0007a881CD95B1484fca47615B64803dad620C8d \
cargo test l2 --release -- --nocapture --test-threads=1

# The purpose of this job is to add it as a required check in GitHub so that we don't have to add every individual job as a required check
all-tests:
# "Integration Test L2" is a required check, don't change the name
name: Integration Test L2
runs-on: ubuntu-latest
needs:
[
detect-changes,
integration-test,
state-diff-test,
integration-test-tdx,
integration-test-l2-dev,
]
[detect-changes, integration-test, state-diff-test, integration-test-tdx]
# Make sure this job runs even if the previous jobs failed or were skipped
if: ${{ needs.detect-changes.outputs.run_tests == 'true' && always() && needs.integration-test.result != 'skipped' && needs.state-diff-test.result != 'skipped' && needs.integration-test-tdx.result != 'skipped' && needs.integration-test-l2-dev.result != 'skipped' }}

Check failure on line 518 in .github/workflows/pr-main_l2.yaml

View workflow job for this annotation

GitHub Actions / Lint

property "integration-test-l2-dev" is not defined in object type {detect-changes: {outputs: {run_tests: string}; result: string}; integration-test: {outputs: {}; result: string}; integration-test-tdx: {outputs: {}; result: string}; state-diff-test: {outputs: {}; result: string}}
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

The if condition still references needs.integration-test-l2-dev.result, but integration-test-l2-dev has been removed from the needs array. This will cause the workflow to fail because it references a non-existent dependency. Remove && needs.integration-test-l2-dev.result != 'skipped' from this condition.

Suggested change
if: ${{ needs.detect-changes.outputs.run_tests == 'true' && always() && needs.integration-test.result != 'skipped' && needs.state-diff-test.result != 'skipped' && needs.integration-test-tdx.result != 'skipped' && needs.integration-test-l2-dev.result != 'skipped' }}
if: ${{ needs.detect-changes.outputs.run_tests == 'true' && always() && needs.integration-test.result != 'skipped' && needs.state-diff-test.result != 'skipped' && needs.integration-test-tdx.result != 'skipped' }}

Copilot uses AI. Check for mistakes.
steps:
- name: Check if any job failed
run: |
Expand All @@ -591,8 +528,3 @@
echo "Job State Reconstruction Tests failed"
exit 1
fi

if [ "${{ needs.integration-test-l2-dev.result }}" != "success" ]; then
echo "Job Integration Tests L2 Dev failed"
exit 1
fi
Loading