Skip to content
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

Add more delay on the etherscan CI test #500

Merged
merged 3 commits into from
Oct 12, 2023
Merged
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
14 changes: 10 additions & 4 deletions scripts/ci_test_etherscan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ cd "$DIR" || exit 255

solc-select use 0.4.25 --always-install

delay_no_key () {
delay_etherscan () {
# Perform a small sleep when API key is not available (e.g. on PR CI from external contributor)
if [ "$GITHUB_ETHERSCAN" = "" ]; then
sleep 5s
else
# Always sleep 2 second in the CI
# We have a lot of concurrent github action so this is needed
sleep 2s
fi
}

Expand All @@ -24,7 +28,7 @@ then
fi
echo "::endgroup::"

delay_no_key
delay_etherscan

# From crytic/slither#1154
echo "::group::Etherscan #3"
Expand All @@ -37,7 +41,7 @@ then
fi
echo "::endgroup::"

delay_no_key
delay_etherscan

# From crytic/crytic-compile#415
echo "::group::Etherscan #4"
Expand All @@ -50,7 +54,7 @@ then
fi
echo "::endgroup::"

delay_no_key
delay_etherscan

# From crytic/crytic-compile#150
echo "::group::Etherscan #5"
Expand All @@ -70,6 +74,8 @@ then
fi
echo "::endgroup::"

delay_etherscan

# From crytic/crytic-compile#151
echo "::group::Etherscan #6"
crytic-compile 0x4c808e3c011514d5016536af11218eec537eb6f5 --compile-remove-metadata --etherscan-apikey "$GITHUB_ETHERSCAN"
Expand Down