mirror of
https://code.forgejo.org/actions/forgejo-release
synced 2026-02-18 12:37:02 +00:00
test: drop tea tests
This commit is contained in:
parent
70b763873a
commit
f1c16f2fa6
2 changed files with 1 additions and 33 deletions
|
|
@ -2,7 +2,7 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "**"
|
- '**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
|
|
@ -24,6 +24,4 @@ jobs:
|
||||||
|
|
||||||
- name: Unit tests of the supporting script forgejo-release.sh
|
- name: Unit tests of the supporting script forgejo-release.sh
|
||||||
run: |
|
run: |
|
||||||
testdata/forgejo-release-test.sh test_system_tea_bin
|
|
||||||
testdata/forgejo-release-test.sh test_download_tea_bin
|
|
||||||
testdata/forgejo-release-test.sh test_maybe_sign_release
|
testdata/forgejo-release-test.sh test_maybe_sign_release
|
||||||
|
|
|
||||||
30
testdata/forgejo-release-test.sh
vendored
30
testdata/forgejo-release-test.sh
vendored
|
|
@ -4,41 +4,11 @@
|
||||||
set -ex
|
set -ex
|
||||||
PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: '
|
PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: '
|
||||||
|
|
||||||
: ${TEA_BIN:=$TMP_DIR/tea}
|
|
||||||
: ${TEA_VERSION:=0.10.1}
|
|
||||||
|
|
||||||
# TODO: remove, still used in some tests
|
|
||||||
setup_tea() {
|
|
||||||
if which tea 2>/dev/null; then
|
|
||||||
TEA_BIN=$(which tea)
|
|
||||||
elif ! test -f $TEA_BIN; then
|
|
||||||
ARCH=$(dpkg --print-architecture)
|
|
||||||
curl -sL https://dl.gitea.io/tea/$TEA_VERSION/tea-$TEA_VERSION-linux-"$ARCH" >$TEA_BIN
|
|
||||||
chmod +x $TEA_BIN
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
test_system_tea_bin() {
|
|
||||||
SYSTEM_TEA_BIN=$TMP_DIR/tea
|
|
||||||
touch $SYSTEM_TEA_BIN && chmod +x $SYSTEM_TEA_BIN
|
|
||||||
export PATH=$TMP_DIR:$PATH
|
|
||||||
setup_tea
|
|
||||||
test $TEA_BIN == $SYSTEM_TEA_BIN
|
|
||||||
}
|
|
||||||
|
|
||||||
test_download_tea_bin() {
|
|
||||||
# assume tea is not installed on system
|
|
||||||
setup_tea
|
|
||||||
test $TEA_BIN == $TMP_DIR/tea
|
|
||||||
}
|
|
||||||
|
|
||||||
test_teardown() {
|
test_teardown() {
|
||||||
setup_api
|
setup_api
|
||||||
api DELETE repos/$REPO/releases/tags/$TAG || true
|
api DELETE repos/$REPO/releases/tags/$TAG || true
|
||||||
api DELETE repos/$REPO/tags/$TAG || true
|
api DELETE repos/$REPO/tags/$TAG || true
|
||||||
rm -fr dist/release
|
rm -fr dist/release
|
||||||
setup_tea
|
|
||||||
$TEA_BIN login delete $DOER || true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
test_reset_repo() {
|
test_reset_repo() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue