From 8d096636098cafb87507abd53cbb5e4ee8b9fe86 Mon Sep 17 00:00:00 2001 From: Ashim Shrestha Date: Thu, 26 Nov 2026 15:21:21 +0545 Subject: [PATCH] ci: fix API tests in upgrade testing Signed-off-by: Ashim Shrestha --- .github/workflows/app-upgrade.yml | 21 ++++++++++++++++++++- .github/workflows/nightly-ci-master.yml | 1 + 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/app-upgrade.yml b/.github/workflows/app-upgrade.yml index 4fecf34f1..c372cfbff 100644 --- a/.github/workflows/app-upgrade.yml +++ b/.github/workflows/app-upgrade.yml @@ -54,7 +54,7 @@ jobs: SQL: ${{ matrix.database }} SERVER_BRANCH: ${{ matrix.nextcloudVersion }} NEXTCLOUD_AUTOINSTALL: 'Yes' - NEXTCLOUD_AUTOINSTALL_APPS: oidc groupfolders user_oidc integration_openproject + NEXTCLOUD_AUTOINSTALL_APPS: oidc groupfolders user_oidc NEXTCLOUD_AUTOINSTALL_APPS_WAIT_TIME: 60 WITH_REDIS: 'YES' ports: @@ -97,6 +97,25 @@ jobs: cache: 'npm' cache-dependency-path: 'integration_openproject/package-lock.json' + - name: Install stable integration_openproject app + env: + REPO: ${{ github.repository }} + run: | + BRANCH_VERSION=$(grep -oP '(?<=)[^<]+' integration_openproject/appinfo/info.xml | cut -d. -f1,2) + STABLE_RELEASE_TAGS=$(gh release list --repo "${REPO}" --json tagName -q '.[].tagName' \ + | grep -v nightly) + + TAG=$(echo "${STABLE_RELEASE_TAGS}" | grep "^v${VERSION}\." | head -n1) + if [ -z "$TAG" ]; then + TAG=$(echo "${STABLE_RELEASE_TAGS}" | head -n1) + fi + + gh release download "${TAG}" --repo "${REPO}" --pattern '*.tar.gz' --dir /tmp/app + docker cp /tmp/app nextcloud:/tmp/app + docker exec nextcloud bash -c ' + tar -xzf /tmp/app/*.tar.gz -C /var/www/html/apps && + occ app:enable integration_openproject' + - name: Wait for Nextcloud server to be ready run: | if ! timeout 5m bash -c ' diff --git a/.github/workflows/nightly-ci-master.yml b/.github/workflows/nightly-ci-master.yml index d0867bdb8..a6819200e 100644 --- a/.github/workflows/nightly-ci-master.yml +++ b/.github/workflows/nightly-ci-master.yml @@ -9,6 +9,7 @@ name: Nightly CI (Master) on: schedule: - cron: '0 22 * * *' # run at 10 PM UTC + pull_request: jobs: nightly-builds: