Skip to content

Commit

Permalink
Merge branch 'main' into bbusa/magi
Browse files Browse the repository at this point in the history
barnabasbusa authored Jul 2, 2024
2 parents e884c9c + 9473f89 commit 79d11c8
Showing 3 changed files with 88 additions and 7 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -41,8 +41,19 @@ jobs:
echo "Skipping ./.github/tests/mix-with-tools-mev.yaml"
fi
- name: Check if Discord Webhook is Set
id: check_discord_webhook
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
run: |
if [ -z "$DISCORD_WEBHOOK" ]; then
echo "discord_webhook_set=false" >> $GITHUB_ENV
else
echo "discord_webhook_set=true" >> $GITHUB_ENV
fi
- name: Notify
if: cancelled() || failure()
if: (cancelled() || failure()) && env.discord_webhook_set == 'true'
uses: Ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
67 changes: 67 additions & 0 deletions .github/workflows/run-k8s.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Run k8s test

on:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'

concurrency:
group: "scheduled-test"
cancel-in-progress: false

jobs:
run_k8s_test:
strategy:
matrix:
payload:
- { name: "single", file: "./.github/tests/single_l2.yaml" }
- { name: "network-params", file: "./network_params.yaml" }
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup minikube
id: minikube
uses: medyagh/setup-minikube@latest
- name: Get kubeconfig
id: kubeconfig
shell: bash
run: |
cat ~/.kube/config > kubeconfig
echo "kubeconfig=$(cat kubeconfig | base64 -w 0)" >> $GITHUB_OUTPUT
# run kurtosis test and assertoor
- name: Run kurtosis testnet
id: testnet
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
kurtosis_extra_args: "--image-download always --non-blocking-tasks --verbosity DETAILED"
kurtosis_backend: "kubernetes"
kubernetes_config: "${{ steps.kubeconfig.outputs.kubeconfig }}"
kubernetes_cluster: "minikube"
kubernetes_storage_class: "standard"
ethereum_package_branch: ""
ethereum_package_args: "${{ matrix.payload.file }}"
ethereum_package_url: "$GITHUB_WORKSPACE"
enclave_name: "optimism-package-${{ matrix.payload.name }}-${{ github.run_id }}"
persistent_logs: "true"

- name: Check if Discord Webhook is Set
id: check_discord_webhook
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
run: |
if [ -z "$DISCORD_WEBHOOK" ]; then
echo "discord_webhook_set=false" >> $GITHUB_ENV
else
echo "discord_webhook_set=true" >> $GITHUB_ENV
fi
- name: Notify
if: (cancelled() || failure()) && env.discord_webhook_set == 'true'
uses: Ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: "The k8s nightly/per PR test for ${{matrix.payload.name}} on optimism-package has failed. Find it here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
15 changes: 9 additions & 6 deletions src/contracts/contract_deployer.star
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ def deploy_factory_contract(
l1_config_env_vars,
):
factory_deployment_result = plan.run_sh(
name="op_deploy_factory_contract",
name="op-deploy-factory-contract",
description="Deploying L2 factory contract to L1 (needs to wait for l1 to finalize, about 4 min for minimal preset, 30 min for mainnet)",
image=IMAGE,
env_vars={
@@ -47,7 +47,7 @@ def deploy_l2_contracts(
l2_services_suffix,
):
op_genesis = plan.run_sh(
name="op_deploy_l2_contracts",
name="op-deploy-l2-contracts",
description="Deploying L2 contracts (takes about a minute)",
image=IMAGE,
env_vars={
@@ -108,47 +108,50 @@ def deploy_l2_contracts(
)

gs_sequencer_private_key = plan.run_sh(
name="read-gs-sequencer-private-key",
description="Getting the sequencer private key",
run="cat /network-configs/GS_SEQUENCER_PRIVATE_KEY ",
files={"/network-configs": op_genesis.files_artifacts[0]},
)

gs_batcher_private_key = plan.run_sh(
name="read-gs-batcher-private-key",
description="Getting the batcher private key",
run="cat /network-configs/GS_BATCHER_PRIVATE_KEY ",
files={"/network-configs": op_genesis.files_artifacts[0]},
)

gs_proposer_private_key = plan.run_sh(
name="read-gs-proposer-private-key",
description="Getting the proposer private key",
run="cat /network-configs/GS_PROPOSER_PRIVATE_KEY ",
files={"/network-configs": op_genesis.files_artifacts[0]},
)

l2oo_address = plan.run_sh(
name="read_l2oo_address",
name="read-l2oo-address",
description="Getting the L2OutputOracleProxy address",
run="jq -r .L2OutputOracleProxy /network-configs/kurtosis.json | tr -d '\n'",
files={"/network-configs": op_genesis.files_artifacts[0]},
)

l1_bridge_address = plan.run_sh(
name="read_l1_bridge_address",
name="read-l1-bridge-address",
description="Getting the L1StandardBridgeProxy address",
run="jq -r .L1StandardBridgeProxy /network-configs/kurtosis.json | tr -d '\n'",
files={"/network-configs": op_genesis.files_artifacts[0]},
)

l1_deposit_start_block = plan.run_sh(
name="read_l1_deposit_start_block",
name="read-l1-deposit-start-block",
description="Getting the L1StandardBridgeProxy address",
image="badouralix/curl-jq",
run="jq -r .genesis.l1.number /network-configs/rollup.json | tr -d '\n'",
files={"/network-configs": op_genesis.files_artifacts[0]},
)

l1_portal_contract = plan.run_sh(
name="read_l1_portal_contract",
name="read-l1-portal-contract",
description="Getting the L1 portal contract",
run="jq -r .OptimismPortal /network-configs/kurtosis.json | tr -d '\n'",
files={"/network-configs": op_genesis.files_artifacts[0]},

0 comments on commit 79d11c8

Please sign in to comment.