refactor end-to-end.yml workflow to use a top-level end-to-end.sh
This commit is contained in:
parent
62f75aa56f
commit
bf689a2478
9 changed files with 142 additions and 74 deletions
|
|
@ -11,19 +11,17 @@
|
|||
# Everything happens in /tmp/forgejo-upgrades
|
||||
#
|
||||
|
||||
SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
SELF="${BASH_SOURCE[0]}"
|
||||
source $SELF_DIR/../../lib/lib.sh
|
||||
UPGRADE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
STORAGE_PATHS="attachments avatars lfs packages repo-archive repo-avatars"
|
||||
STORAGE_FUN="attachments avatars lfs packages repo_archive repo_avatars"
|
||||
: ${FORGEJO_REPO:=fixture}
|
||||
|
||||
source $SELF_DIR/fixtures.sh
|
||||
source $UPGRADE_DIR/fixtures.sh
|
||||
|
||||
function reset() {
|
||||
local config=$1
|
||||
reset_forgejo $SELF_DIR/$config-app.ini
|
||||
reset_forgejo $UPGRADE_DIR/$config-app.ini
|
||||
reset_minio
|
||||
reset_garage
|
||||
}
|
||||
|
|
@ -86,17 +84,14 @@ function test_forgejo_database_version() {
|
|||
test "$expected_version" = "$actual_version"
|
||||
}
|
||||
|
||||
source $SELF_DIR/test-upgrade-1.20-storage.sh
|
||||
source $SELF_DIR/test-upgrade-forgejo-database-v3.sh
|
||||
source $SELF_DIR/../../packages/packages.sh
|
||||
source $UPGRADE_DIR/test-upgrade-1.20-storage.sh
|
||||
source $UPGRADE_DIR/test-upgrade-forgejo-database-v3.sh
|
||||
|
||||
function test_upgrades() {
|
||||
run stop
|
||||
run dependencies
|
||||
run build_all
|
||||
|
||||
test_packages
|
||||
|
||||
run test_successful_upgrades
|
||||
run test_storage_stable_s3 minio
|
||||
run test_storage_stable_s3 garage
|
||||
|
|
@ -104,5 +99,3 @@ function test_upgrades() {
|
|||
test_upgrade_1_20_storage
|
||||
run test_forgejo_database_v3_upgrades
|
||||
}
|
||||
|
||||
"$@"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue