mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +00:00
Support pinning nightly ef test runs (#8738)
Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com> Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -4,7 +4,7 @@ set -Eeuo pipefail
|
|||||||
TESTS=("general" "minimal" "mainnet")
|
TESTS=("general" "minimal" "mainnet")
|
||||||
|
|
||||||
version=${1}
|
version=${1}
|
||||||
if [[ "$version" == "nightly" ]]; then
|
if [[ "$version" == "nightly" || "$version" =~ ^nightly-[0-9]+$ ]]; then
|
||||||
if [[ -z "${GITHUB_TOKEN:-}" ]]; then
|
if [[ -z "${GITHUB_TOKEN:-}" ]]; then
|
||||||
echo "Error GITHUB_TOKEN is not set"
|
echo "Error GITHUB_TOKEN is not set"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -21,9 +21,13 @@ if [[ "$version" == "nightly" ]]; then
|
|||||||
api="https://api.github.com"
|
api="https://api.github.com"
|
||||||
auth_header="Authorization: token ${GITHUB_TOKEN}"
|
auth_header="Authorization: token ${GITHUB_TOKEN}"
|
||||||
|
|
||||||
run_id=$(curl -s -H "${auth_header}" \
|
if [[ "$version" == "nightly" ]]; then
|
||||||
"${api}/repos/${repo}/actions/workflows/generate_vectors.yml/runs?branch=dev&status=success&per_page=1" |
|
run_id=$(curl --fail -s -H "${auth_header}" \
|
||||||
jq -r '.workflow_runs[0].id')
|
"${api}/repos/${repo}/actions/workflows/nightly-reftests.yml/runs?branch=master&status=success&per_page=1" |
|
||||||
|
jq -r '.workflow_runs[0].id')
|
||||||
|
else
|
||||||
|
run_id="${version#nightly-}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${run_id}" == "null" || -z "${run_id}" ]]; then
|
if [[ "${run_id}" == "null" || -z "${run_id}" ]]; then
|
||||||
echo "No successful nightly workflow run found"
|
echo "No successful nightly workflow run found"
|
||||||
@@ -31,7 +35,7 @@ if [[ "$version" == "nightly" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Downloading nightly test vectors for run: ${run_id}"
|
echo "Downloading nightly test vectors for run: ${run_id}"
|
||||||
curl -s -H "${auth_header}" "${api}/repos/${repo}/actions/runs/${run_id}/artifacts" |
|
curl --fail -H "${auth_header}" "${api}/repos/${repo}/actions/runs/${run_id}/artifacts" |
|
||||||
jq -c '.artifacts[] | {name, url: .archive_download_url}' |
|
jq -c '.artifacts[] | {name, url: .archive_download_url}' |
|
||||||
while read -r artifact; do
|
while read -r artifact; do
|
||||||
name=$(echo "${artifact}" | jq -r .name)
|
name=$(echo "${artifact}" | jq -r .name)
|
||||||
|
|||||||
Reference in New Issue
Block a user