diff --git a/.forgejo/workflows/tests.yml b/.forgejo/workflows/tests.yml index d521c77..9f55112 100644 --- a/.forgejo/workflows/tests.yml +++ b/.forgejo/workflows/tests.yml @@ -2,7 +2,7 @@ on: pull_request: push: branches: - - "**" + - '**' jobs: tests: @@ -24,6 +24,4 @@ jobs: - name: Unit tests of the supporting script forgejo-release.sh 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 diff --git a/testdata/forgejo-release-test.sh b/testdata/forgejo-release-test.sh index c00d45e..18a2641 100755 --- a/testdata/forgejo-release-test.sh +++ b/testdata/forgejo-release-test.sh @@ -4,41 +4,11 @@ set -ex 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() { setup_api api DELETE repos/$REPO/releases/tags/$TAG || true api DELETE repos/$REPO/tags/$TAG || true rm -fr dist/release - setup_tea - $TEA_BIN login delete $DOER || true } test_reset_repo() {