Skip to content

ci: automate upgrade testing#1019

Open
nabim777 wants to merge 7 commits into
release/2.11from
upgrade-testing-local-setup
Open

ci: automate upgrade testing#1019
nabim777 wants to merge 7 commits into
release/2.11from
upgrade-testing-local-setup

Conversation

@nabim777
Copy link
Copy Markdown
Collaborator

@nabim777 nabim777 commented May 12, 2026

Description

This PR adds an upgrade testing workflow.

It validates the full upgrade path by:

  1. Publishing the app versions to a self-hosted app store.
  2. Installing the other apps(activity groupfolder user_oidc oidc) from the official app store.
  3. Installing the old version of integration_openproject apps from self-hosted app store.
  4. Upgrading to the new version of integration_openproject apps from self-hosted app store.
  5. Running API tests

Tests run across multiple Nextcloud and PHP version combinations.
Available env:
NEXTCLOUD_VERSIONS: Nextcloud versions to test.
PHP_VERSIONS: PHP versions to test.
PREVIOUS_APP_VERSION: App version installed first (old version).
UPGRADE_APP_VERSION: App version installed during upgrade (new version).

For now, this workflow runs on every pull request.

The open question is:

  • when should this workflow actually run?
  • In which env it need to run?

Related Issue or Workpackage

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Updated CHANGELOG.md file

@nabim777 nabim777 force-pushed the upgrade-testing-local-setup branch 2 times, most recently from b714a55 to 48467b1 Compare May 12, 2026 11:10
@nabim777 nabim777 changed the base branch from master to release/2.11 May 13, 2026 03:52
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
@nabim777 nabim777 force-pushed the upgrade-testing-local-setup branch from 48467b1 to 2771035 Compare May 13, 2026 03:59
@github-actions
Copy link
Copy Markdown

JS Code Coverage

Coverage after merging upgrade-testing-local-setup into release/2.11 will be
90.93%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   adminSettings.js0%0%0%0%1, 1, 10–19, 2–9
   bootstrap.js0%0%0%0%1, 1, 10–12, 2–9
   dashboard.js0%0%0%0%1, 1, 10–19, 2–9
   fileActions.js0%0%0%0%1, 1, 10–19, 2, 20–23, 3–9
   personalSettings.js0%0%0%0%1, 1, 10–19, 2–9
   projectTab.js0%0%0%0%1, 1, 10–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50, 6–9
   reference.js0%0%0%0%1, 1, 10–19, 2, 20–29, 3, 30–39, 4, 40–45, 5–9
   utils.js85.71%62.50%66.67%87.41%12–14, 142–143, 15–20, 23–32
src/api
   endpoints.js100%100%100%100%
   settings.js64.71%100%0%73.33%10–11, 14–15
src/components
   AdminSettings.vue96.33%96.03%95.88%96.41%1005, 1008–1014, 1044–1045, 1049–1050, 1053–1054, 1058–1059, 1069–1074, 1146–1148, 1160–1163, 1176–1178, 1202–1205, 1239–1247, 1304–1306, 1341–1344, 1380–1382, 1402–1405, 724, 835–837, 992–994
   ErrorLabel.vue100%100%100%100%
   OAuthConnectButton.vue85.82%63.64%100%87.39%49–56, 64–69, 72–76
   PersonalSettings.vue92.02%95.65%90%91.71%133–134, 144–149, 152–161
src/components/admin
   FieldValue.vue100%100%100%100%
   FormAuthMethod.vue98.12%96.88%100%98.12%222–224, 247–250
   FormHeading.vue100%100%100%100%
   FormOpenProjectHost.vue98.90%95%100%99.35%175–177, 287
   TermsOfServiceUnsigned.vue100%100%100%100%
   TextInput.vue100%100%100%100%
src/components/icons
   ClippyIcon.vue100%100%100%100%
   OpenProjectIcon.vue100%100%100%100%
src/components/settings
   CheckBox.vue100%100%100%100%
   ErrorNote.vue100%100%100%100%
   SettingsTitle.vue96.91%85.71%100%97.67%51–53
src/components/tab
   EmptyContent.vue96.45%80.95%100%98.24%102–105, 107–108, 97
   SearchInput.vue95.31%92.96%94.74%95.78%138–139, 192, 203–208, 267–269, 285–287, 291–296
   WorkPackage.vue86.25%73.17%93.33%87.62%107–116, 129–131, 142–146, 156–158, 176–182, 220, 220–225, 225, 225–236, 81–82
src/constants
   appID.js100%100%100%100%
   links.js100%100%100%100%
   messages.js100%100%100%100%
src/filesPlugin
   filesPlugin.js0%0%0%0%1, 1, 10, 100, 11–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50–59, 6, 60–69, 7, 70–79, 8, 80–89, 9, 90–99
   filesPluginLessThan28.js0%0%0%0%1, 1, 10–19, 2, 20–29, 3, 30–39, 4, 40–49, 5, 50–59, 6, 60–69, 7, 70, 8–9
src/utils
   workpackageHelper.js93.80%93.10%88.89%94.24%100–102, 23–27, 54, 54–56, 97–99
src/views
   CreateWorkPackageModal.vue94.18%86.32%90.48%95.43%367–372, 375, 391, 508–511, 516–521, 526–531, 537–540, 543, 559, 559, 600–604, 614–616, 639–640, 648–650, 679–681, 703–705, 714–718
   Dashboard.vue92.96%92.86%82.61%93.77%120–125, 134, 144, 147, 158–160, 214–217, 220–221, 228–232, 67
   LinkMultipleFilesModal.vue99.14%97.56%100%99.32%157–159
   ProjectsTab.vue94.06%92.45%93.33%94.33%100–101, 107–109, 129, 140–141, 175–185, 234–236, 98–99

@github-actions
Copy link
Copy Markdown

PHP Code Coverage

Coverage after merging upgrade-testing-local-setup into release/2.11 will be
66.92%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
integration_openproject/server/apps/integration_openproject/lib
   Capabilities.php0%100%0%0%24, 31–40
   OIDCClientMapper.php0%100%0%0%29, 40–49, 52
   TokenEventFactory.php100%100%100%100%
integration_openproject/server/apps/integration_openproject/lib/AppInfo
   Application.php36.59%100%50%35.53%105–107, 110–114, 116–121, 123–124, 127, 132–133, 135–138, 140, 142, 144, 148–151, 153–164, 166, 169, 173, 177–179, 212
integration_openproject/server/apps/integration_openproject/lib/BackgroundJob
   RemoveExpiredDirectUploadTokens.php0%100%0%0%28, 30–32, 41–42
integration_openproject/server/apps/integration_openproject/lib/Controller
   ConfigController.php75.12%100%64.71%75.56%114, 151–152, 154, 156–158, 160–163, 166–167, 169, 194, 198–200, 442–444, 446–448, 497, 541–543, 577–581, 592, 606–609, 617, 621–624, 660, 663–678, 695–700, 702–703, 705–707, 710, 712–728, 742–745, 747–751
   DirectDownloadController.php0%100%0%0%33–35, 50–52, 54–61
   DirectUploadController.php71.03%100%100%70.21%117–119, 162–164, 175, 179–182, 184, 194, 201, 217–219, 221–222, 225–230, 233, 235, 245–247, 253–255, 263–265, 280–282, 301, 306, 312
   FilesController.php86.99%100%83.33%87.18%178–179, 241, 250, 267–270, 275–277, 282–284, 293
   OpenProjectAPIController.php80.51%100%82.35%80.34%107, 146, 193–195, 198–205, 207–211, 213, 232, 257, 322, 372, 392, 439, 464–466, 469–473, 475, 66
   OpenProjectController.php96.45%100%80%96.95%241–245
integration_openproject/server/apps/integration_openproject/lib/Dashboard
   OpenProjectWidget.php0%100%0%0%101, 108–109, 111–116, 118–122, 124–126, 129–140, 61–66, 73, 80, 87, 94
integration_openproject/server/apps/integration_openproject/lib/Exception
   OpenprojectAvatarErrorException.php100%100%100%100%
   OpenprojectErrorException.php100%100%100%100%
   OpenprojectFileNotUploadedException.php100%100%100%100%
   OpenprojectGroupfolderSetupConflictException.php100%100%100%100%
   OpenprojectResponseException.php100%100%100%100%
   OpenprojectUnauthorizedUserException.php0%100%0%0%21
integration_openproject/server/apps/integration_openproject/lib/Listener
   BeforeGroupDeletedListener.php100%100%100%100%
   BeforeNodeInsideOpenProjectGroupfilderChangedListener.php0%100%0%0%46–48, 52–55, 57, 59, 62–63, 65, 67–70, 72–75, 77–79
   BeforeUserDeletedListener.php0%100%0%0%30, 37–38, 40–43, 45
   LoadAdditionalScriptsListener.php0%100%0%0%37–38, 46–47, 49, 51–52, 54
   LoadSidebarScript.php65.91%100%100%64.29%105, 77–88, 95, 98
   OpenProjectReferenceListener.php0%100%0%0%45–47, 54–55, 57, 59–60, 62–74
   TermsOfServiceEventListener.php0%100%0%0%41–42, 47–48, 50–51, 53–55, 58–62
   UserChangedListener.php0%100%0%0%34, 41–42, 45–50, 53
integration_openproject/server/apps/integration_openproject/lib/Migration
   Version2001Date20221213083550.php0%100%0%0%30, 40–48, 50–58, 60–62, 64
   Version20100Date20250820101358.php0%100%0%0%38, 47–53, 56
   Version2310Date20230116153411.php0%100%0%0%29, 32–35, 37–62, 64–65, 67
   Version2400Date20230504144300.php0%100%0%0%30, 40–43
   Version2640Date20240628114301.php0%100%0%0%35, 47–49, 52–53, 56
   Version2900Date20250718065820.php0%100%0%0%22, 33–36, 38–39, 41–42, 45
integration_openproject/server/apps/integration_openproject/lib/Reference
   WorkPackageReferenceProvider.php51.67%100%25%58.33%100–101, 104, 108, 142, 150–151, 159, 37, 44, 51, 58–60, 87, 93–96, 99
integration_openproject/server/apps/integration_openproject/lib/Search
   OpenProjectSearchProvider.php0%100%0%0%100–102, 104–106, 109–110, 112–113, 116–125, 127–131, 52–55, 62, 69, 77, 79, 82, 89–90, 93–97, 99
   OpenProjectSearchResultEntry.php100%100%100%100%
integration_openproject/server/apps/integration_openproject/lib/Service
   DatabaseService.php42.31%100%60%40.43%108–112, 114, 63–76, 78–85
   DirectDownloadService.php88.46%100%100%87.50%62–63, 65
   DirectUploadService.php42.86%100%66.67%40%101, 62–65, 67–75, 95
   OauthService.php0%100%0%0%100–101, 40–42, 51–58, 60–66, 75–83, 94–99
   OpenProjectAPIService.php75.05%100%77.46%74.86%1006–1007, 1009,

@nabim777 nabim777 force-pushed the upgrade-testing-local-setup branch 4 times, most recently from 69ffef9 to 6b30af6 Compare May 13, 2026 04:55
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
@nabim777 nabim777 force-pushed the upgrade-testing-local-setup branch 5 times, most recently from 9ecc483 to b85fe46 Compare May 14, 2026 03:51
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
@nabim777 nabim777 force-pushed the upgrade-testing-local-setup branch 3 times, most recently from 97a83af to 64f2bab Compare May 14, 2026 06:39
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
@nabim777 nabim777 force-pushed the upgrade-testing-local-setup branch 3 times, most recently from f5123d9 to 13059b1 Compare May 14, 2026 07:08
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
@nabim777 nabim777 force-pushed the upgrade-testing-local-setup branch from 13059b1 to 3234322 Compare May 14, 2026 07:10
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
@nabim777 nabim777 force-pushed the upgrade-testing-local-setup branch from e7f22dd to c696b82 Compare May 14, 2026 07:33
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
@nabim777
Copy link
Copy Markdown
Collaborator Author

question is:
when should this workflow actually run?
In which env it need to run?

cc @saw-jan @individual-it

@nabim777 nabim777 changed the title ci: automate upgrade testing CI: Automate upgrade testing May 14, 2026
@nabim777 nabim777 changed the title CI: Automate upgrade testing ci: automate upgrade testing May 14, 2026
Comment on lines +1 to +8
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. <https://fsfe.org>
#
# SPDX-License-Identifier: CC0-1.0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. <https://fsfe.org>
#
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: 2026 Jankari Tech Pvt. Ltd.
# SPDX-License-Identifier: AGPL-3.0-or-later

Comment on lines +1 to +4
# SPDX-FileCopyrightText: 2023-2024 Jankari Tech Pvt. Ltd.
# SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS"
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH
# SPDX-License-Identifier: AGPL-3.0-only
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# SPDX-FileCopyrightText: 2023-2024 Jankari Tech Pvt. Ltd.
# SPDX-FileCopyrightText: 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS"
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH
# SPDX-License-Identifier: AGPL-3.0-only
# SPDX-FileCopyrightText: 2026 Jankari Tech Pvt. Ltd.
# SPDX-License-Identifier: AGPL-3.0-only

Comment on lines +42 to +43
PREVIOUS_APP_VERSION: 2.9.2
UPGRADE_APP_VERSION: 2.10.0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should install the current compatible app version without specifying the version.
The app version to upgrade should be greater than the current version.

Comment on lines +87 to +89
- name: Build nextcloud project
run: |
export DEBIAN_FRONTEND=noninteractive
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we start nextcloud in the service section?

Comment on lines +120 to +151
- name: Setup System dependencies for appstore
run: |
sudo apt install -y \
python3-venv \
python3-wheel \
libxslt-dev \
libxml2-dev \
libz-dev \
libpq-dev \
build-essential \
python3-dev \
python3-setuptools \
gettext \
libssl-dev \
libffi-dev \
nodejs \
yarn

- name: Checkout appstore
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
repository: nextcloud/appstore
path: appstore

- name: Install Appstore
run: |
cd appstore
python3 -m venv venv
source venv/bin/activate
pip install poetry==1.8.2
make dev-setup
python manage.py runserver &
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, maybe we should create custom minimal REST server as appstore

Comment on lines +58 to +61
with:
path: integration_openproject
fetch-tags: true
ref: v${{ env.UPGRADE_APP_VERSION }}
Copy link
Copy Markdown
Collaborator

@saw-jan saw-jan May 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about it. simply checkout the current source

Comment on lines +84 to +85
coverage: xdebug
tools: php-cs-fixer, phpunit
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need xdebug and the other tools?


env:
DJANGO_SETTINGS_MODULE: nextcloudappstore.settings.development
PREVIOUS_APP_VERSION: 2.9.2
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that version should be found automatically. Just take the last released stable version.
Otherwise, there is one more place to remember to change version numbers.

Copy link
Copy Markdown
Collaborator

@individual-it individual-it left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the log output of the test run I see
Error response from daemon: No such container: nextcloud
what is that about? Kind of confusing to see this error.

wget https://raw.githubusercontent.com/nextcloud/integration_openproject/${{github.head_ref}}/.github/scripts/self-hosted-app-store.sh
bash ./self-hosted-app-store.sh

- name: Enable other apps from official app store
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not entirely true, because at least activity is cloned further up by git

env:
APP_VERSION: ${{ env.UPGRADE_APP_VERSION }}
run: |
bash ./self-hosted-app-store.sh
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the name of that bash file is confusing. It sounds as if it starts the app-store, but that is not true.

cd ~/html/nextcloud
# latest data didn't get fetched properly, so we need to clear the appstore cache
echo "" > ~/html/nextcloud/data/appdata_*/appstore/apps.json
php occ app:update --allow-unstable integration_openproject
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should check whether the upgrade to the new version really happened

--admin-user admin \
--admin-pass admin
php occ maintenance:mode --off
sudo php -S localhost:80 -t ~/html/nextcloud &
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better to run NC with a real web-server like apache, but for now this should be fine

- name: Check for Appstore
run: |
cd appstore
status=$(curl -o /dev/null -s -w "%{http_code}" http://localhost:8000)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that appstore URL could go into a variable, because it is used in a lot of places

echo "FAILED (status: $status)"
fi

- name: Register and publish integration_openproject apps
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the previous app version can be installed from the official app store. Just take the latest published stable version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants