-
Notifications
You must be signed in to change notification settings - Fork 292
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
chore(CI): remove end-to-end/Earthfile #9364
Changes from 1 commit
fd0786a
098dc27
93987b0
7a772e3
fa323b2
5426dfd
8b2c02b
04770ae
1e67318
76eae4a
169fabe
5fe4d17
c945428
485ac9c
2f88819
d41eb49
8284205
4e698df
cc41f5b
8e637e0
94e59d0
6da5ceb
5534268
f9c6f20
ca8ace5
84c6379
30ee025
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,53 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
# Enter repo root. | ||
cd "$(dirname "$0")"/../.. | ||
|
||
BRANCH=$1 | ||
LABELS=$2 | ||
|
||
# Read the full list from the file | ||
full_list=$(cat yarn-project/end-to-end/scripts/full_e2e_test_list) | ||
|
||
# Define that need the compose_test script to run | ||
compose_list=( | ||
e2e_sandbox_example | ||
uniswap_trade_on_l1_from_l2 | ||
integration_l1_publisher | ||
e2e_browser | ||
pxe | ||
e2e_docs_examples | ||
guides/writing_an_account_contract | ||
guides/dapp_testing | ||
sample-dapp/ci/index.test.mjs | ||
sample-dapp/index.test.mjs | ||
guides/up_quick_start | ||
) | ||
|
||
# Add labels from input to the allow_list | ||
IFS=',' read -r -a input_labels <<<"$LABELS" | ||
allow_list+=("${input_labels[@]}") | ||
|
||
# Generate full list of targets, excluding specific entries, on one line | ||
test_list=$(echo "${full_list[@]}" | grep -v 'base' | grep -v 'bench' | grep -v "network" | grep -v 'devnet' | xargs echo) | ||
|
||
# # If branch is master or allow_list contains 'e2e-all', return full list | ||
if [[ "$BRANCH" == "master" ]] || [[ " ${allow_list[@]} " =~ "e2e-all" ]]; then | ||
# print as JSON list | ||
echo "$test_list" | jq -Rc 'split(" ")' | ||
exit 0 | ||
fi | ||
|
||
# # Filter the test_list to include only items in the allow_list | ||
filtered_list=() | ||
for item in $test_list; do | ||
for allowed in "${allow_list[@]}"; do | ||
if [[ "$item" == "$allowed" ]]; then | ||
filtered_list+=("$item") | ||
fi | ||
done | ||
done | ||
|
||
# # Print the filtered list in JSON format | ||
echo ${filtered_list[@]} | jq -Rc 'split(" ")' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#!/bin/bash | ||
set -eu | ||
|
||
# Enter repo root. | ||
cd "$(dirname "$0")"/../.. | ||
|
||
BRANCH=$1 | ||
LABELS=$2 | ||
|
||
# Define the jobs that will run on every PR | ||
allow_list=( | ||
"e2e-2-pxes" | ||
"e2e-authwit" | ||
"e2e-avm-simulator" | ||
"e2e-block-building" | ||
"e2e-cross-chain-messaging" | ||
"e2e-deploy-contract" | ||
"e2e-fees" | ||
"e2e-fees-gas-estimation" | ||
"e2e-fees-private-payments" | ||
"e2e-max-block-number" | ||
"e2e-nested-contract" | ||
"e2e-ordering" | ||
"e2e-static-calls" | ||
"integration-l1-publisher" | ||
"e2e-cheat-codes" | ||
"e2e-prover-fake-proofs" | ||
"e2e-lending-contract" | ||
"kind-network-smoke" | ||
) | ||
|
||
# Add labels from input to the allow_list | ||
IFS=',' read -r -a input_labels <<<"$LABELS" | ||
allow_list+=("${input_labels[@]}") | ||
|
||
# Generate full list of targets, excluding specific entries, on one line | ||
full_list=$(earthly ls ./yarn-project/end-to-end | grep -v '+base' | grep -v '+bench' | grep -v "+network" | grep -v 'devnet' | sed 's/+//' | xargs echo) | ||
|
||
echo "Full list: $full_list" | ||
|
||
# If branch is master or allow_list contains 'e2e-all', return full list | ||
if [[ "$BRANCH" == "master" ]] || [[ " ${allow_list[@]} " =~ "e2e-all" ]]; then | ||
# print as JSON list | ||
echo "$full_list" | jq -Rc 'split(" ")' | ||
exit 0 | ||
fi | ||
|
||
# Filter the full_list to include only items in the allow_list | ||
filtered_list=() | ||
for item in $full_list; do | ||
for allowed in "${allow_list[@]}"; do | ||
if [[ "$item" == "$allowed" ]]; then | ||
filtered_list+=("$item") | ||
fi | ||
done | ||
done | ||
|
||
# Print the filtered list in JSON format | ||
echo ${filtered_list[@]} | jq -Rc 'split(" ")' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# Check if the test requires a prover | ||
requires_prover() { | ||
local test_name=$1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this ideally would be encapsulated in the same shell script that runs the things, but nbd There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wasn't sure on how to do this. The result of |
||
[[ $test_name == *"prover"* ]] | ||
} | ||
|
||
test_name=$1 | ||
|
||
if requires_prover "$test_name"; then | ||
echo "64core-tester-x86" | ||
else | ||
echo "8core-tester-x86" | ||
fi |
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.
I was thinking that we wouldn't need conditions here but instead have the commands listed in the test definition txt file
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.
ah, as in move this conditional logic inside
e2e_test.sh
?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.
or just extend e2e_test_list to an object format where we define specific env vars & start command ig
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.
Ideally the script would let people run these locally as well, but a txt format works
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.
one example is a shell script that has a switch statement for each case and also lists each case / each enabled case on demand. We could combine the bench script with it