mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 21:05:34 +03:00
chore(ci): optimize end-to-end runs
* specify the version targeted by the pull request. The end-to-end tests previously compiled all known branches which was a waste. The pull request now must specify which version it is targeting so that only this version is recompiled and used for testing. * when building the daily releases, use the release from the integration organization to ensure the tests are run against the latest build. Clarify in a comment why the lookup order of organizations is reversed in this particular case. Refs: https://code.forgejo.org/forgejo/end-to-end/pulls/239
This commit is contained in:
parent
7cfa3305bf
commit
1f8e6b6e31
2 changed files with 22 additions and 21 deletions
|
@ -13,21 +13,22 @@ minor_version=$(make show-version-minor)
|
||||||
|
|
||||||
cd $end_to_end
|
cd $end_to_end
|
||||||
|
|
||||||
if ! test -f forgejo/sources/$minor_version ; then
|
if ! test -f forgejo/sources/$minor_version; then
|
||||||
echo "FAIL: forgejo/sources/$minor_version does not exist in the end-to-end repository"
|
echo "FAIL: forgejo/sources/$minor_version does not exist in the end-to-end repository"
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
date > last-upgrade
|
echo -n $minor_version >forgejo/build-from-sources
|
||||||
|
date >last-upgrade
|
||||||
|
|
||||||
if test -f "$forgejo_pr_or_ref" ; then
|
if test -f "$forgejo_pr_or_ref"; then
|
||||||
forgejo_pr=$forgejo_pr_or_ref
|
forgejo_pr=$forgejo_pr_or_ref
|
||||||
head_url=$(jq --raw-output .head.repo.html_url < $forgejo_pr)
|
head_url=$(jq --raw-output .head.repo.html_url <$forgejo_pr)
|
||||||
test "$head_url" != null
|
test "$head_url" != null
|
||||||
branch=$(jq --raw-output .head.ref < $forgejo_pr)
|
branch=$(jq --raw-output .head.ref <$forgejo_pr)
|
||||||
test "$branch" != null
|
test "$branch" != null
|
||||||
echo $head_url $branch $full_version > forgejo/sources/$minor_version
|
echo $head_url $branch $full_version >forgejo/sources/$minor_version
|
||||||
else
|
else
|
||||||
forgejo_ref=$forgejo_pr_or_ref
|
forgejo_ref=$forgejo_pr_or_ref
|
||||||
echo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY ${forgejo_ref#refs/heads/} $full_version > forgejo/sources/$minor_version
|
echo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY ${forgejo_ref#refs/heads/} $full_version >forgejo/sources/$minor_version
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -8,15 +8,15 @@ forgejo=$3
|
||||||
forgejo_ref=$4
|
forgejo_ref=$4
|
||||||
|
|
||||||
cd $end_to_end
|
cd $end_to_end
|
||||||
date > last-upgrade
|
date >last-upgrade
|
||||||
organizations=lib/ORGANIZATIONS
|
organizations=lib/ORGANIZATIONS
|
||||||
if ! test -f $organizations ; then
|
if ! test -f $organizations; then
|
||||||
echo "$organizations file not found"
|
echo "$organizations file not found"
|
||||||
false
|
false
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
# do not include forgejo-experimental so that 7.0-test is found
|
# Inverse the order of lookup because the goal in the release built
|
||||||
# in forgejo-integration where it was just built instead of
|
# pipeline is to test the latest build, if available, instead of the
|
||||||
# forgejo-experimental which was published by the previous build
|
# stable version by the same version.
|
||||||
#
|
#
|
||||||
echo forgejo forgejo-integration > $organizations
|
echo forgejo-integration forgejo-experimental forgejo >$organizations
|
||||||
|
|
Loading…
Reference in a new issue