-
Notifications
You must be signed in to change notification settings - Fork 118
ci(l1,l2): add a workflow for testing both L1 & L2 dev #5261
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,77 @@ | ||||||
| name: L1 & L2 Dev | ||||||
ilitteri marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| 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 | ||||||
|
||||||
| cat .env | |
| if [ -f .env ]; then cat .env; else echo ".env file does not exist"; fi |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
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.
| export $(shell cat .env | xargs); \ |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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
|
||||||
|
||||||
| 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' }} |
There was a problem hiding this comment.
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 DevThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 3407671.