Skip to content

ci: fix API tests in upgrade testing - #1209

Open
Ashim-Stha wants to merge 1 commit into
masterfrom
port/fix/upgrade-test
Open

Ashim-Stha wants to merge 1 commit into
masterfrom
port/fix/upgrade-test

Conversation

@Ashim-Stha

@Ashim-Stha Ashim-Stha commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Description

master: install latest stable release -> bump branch minor version -> upgrade
stable: install latest stabled defined in the branch -> bump branch patch version -> upgrade

Related Issue or Workpackage

successful CI runs:

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

@Ashim-Stha Ashim-Stha self-assigned this Nov 27, 2026
@Ashim-Stha
Ashim-Stha force-pushed the port/fix/upgrade-test branch 3 times, most recently from 8a80d4d to a481413 Compare November 27, 2026 11:01
@Ashim-Stha Ashim-Stha changed the title Port/fix/upgrade test ci: fix API tests in upgrade testing Nov 27, 2026
@Ashim-Stha
Ashim-Stha force-pushed the port/fix/upgrade-test branch from a481413 to 1f7271f Compare November 27, 2026 11:31
@Ashim-Stha
Ashim-Stha marked this pull request as ready for review November 27, 2026 11:32
Comment thread .github/workflows/app-upgrade.yml Resolved
Comment thread .github/workflows/app-upgrade.yml Resolved
Comment thread .github/workflows/app-upgrade.yml Resolved
Comment thread .github/workflows/app-upgrade.yml Resolved
Comment thread .github/workflows/app-upgrade.yml Resolved
Comment thread .github/workflows/app-upgrade.yml Outdated
Comment on lines +109 to +112
TAG=$(echo "${STABLE_RELEASE_TAGS}" | grep "^v${VERSION}\." | head -n1)
if [ -z "$TAG" ]; then
TAG=$(echo "${STABLE_RELEASE_TAGS}" | head -n1)
fi

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.

TAG value must be lower or equal (<=) to the VERSION

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.

make sure that the major and minor versions number matches for stable branch. Next version will always be patch level for release branch.
Make sure STABLE_RELEASE_TAGS is sorted in desc order.

@Ashim-Stha
Ashim-Stha force-pushed the port/fix/upgrade-test branch 4 times, most recently from ca6c7c9 to f76e10f Compare December 1, 2026 10:49
Signed-off-by: Ashim Shrestha <ashimshrestha2384@gmail.com>
@Ashim-Stha
Ashim-Stha force-pushed the port/fix/upgrade-test branch from f76e10f to 0ec9913 Compare December 1, 2026 11:26
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

JS Code Coverage

Coverage after merging port/fix/upgrade-test into master will be
83.08%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   adminSettings.js0%100%100%0%12–14
   dashboard.js0%100%0%0%10–12, 15–16
   personalSettings.js0%100%100%0%12–14
   projectTab.js0%0%0%0%16–17, 20, 24, 30, 34, 34, 34, 36, 38
   reference.js0%100%0%0%14, 16, 18, 22, 24–25, 27, 32–34, 36–37, 42–44, 46–48, 50, 52
   setup.js0%100%0%0%10–13, 9
src/components
   AdminSettings.vue87.22%81.58%93.55%87.50%206, 227, 227, 227–228, 24, 247–248, 272–273, 273, 273–274, 276, 78
   ErrorLabel.vue50%100%100%50%6
   OAuthConnectButton.vue80.77%68.75%100%81.48%63–64, 66–67, 69, 72, 72, 72–73, 75
   PersonalSettings.vue79.81%80.43%85%76.32%132–133, 143–145, 145, 145, 145, 145–146, 151–152, 152, 152, 154, 154, 157, 18
src/components/admin
   FieldValue.vue100%100%100%100%
   FormAuthMethod.vue87.97%86.11%87.10%89.39%221, 224, 248, 248, 248–250, 32, 40, 82, 82, 82
   FormHeading.vue75%70%100%100%12, 15, 9
   FormOAuthSettings.vue87.76%91.04%81.82%88.24%101, 137, 217, 248, 351, 351, 351–352, 375, 375, 375–376, 61, 61, 61, 85
   FormOpenProjectHost.vue95.52%90.91%95.45%97.47%156, 159, 53, 53, 53
   FormProjectFolder.vue89.64%87.50%90%91.14%100, 100, 100–101, 101, 119, 139, 269, 322, 341, 341–342, 376, 376–377, 389–390, 408, 410, 431–433, 460, 462, 490, 490, 490–491, 69
   FormSSOSettings.vue93.44%94.29%90.48%93.75%123, 139, 139, 139, 232–233, 238, 244, 294, 359–360, 384, 74
   TermsOfServiceUnsigned.vue100%100%100%100%
   TextInput.vue79.49%100%60%75.76%147, 152, 23–27, 47
src/components/icons
   ClippyIcon.vue66.67%100%0%66.67%11
   OpenProjectIcon.vue66.67%100%0%66.67%11
src/components/settings
   CheckBox.vue81.82%100%60%71.43%15–16
   ErrorNote.vue100%100%100%100%
   SettingsTitle.vue91.30%75%100%93.33%48, 51
src/components/tab
   EmptyContent.vue92%88.37%100%96.15%10, 106–107, 12, 12, 16
   SearchInput.vue88.41%85.90%91.18%89.26%172, 179, 18, 180, 180, 180–181, 198, 209–210, 210, 210–211, 213, 251, 283, 286, 289, 300–302, 306, 309–310
   WorkPackage.vue84.12%73.58%83.33%89.90%118–120, 151–154, 165–166, 228–229, 233, 233, 233, 233–236, 7, 7, 7, 7, 90–91
src/filesPlugin
   filesPlugin.js0%0%0%0%100, 104–106, 108, 111, 113, 115–117, 119–120, 122, 126–127, 15, 15, 15, 19, 27–29, 32, 34–36, 40, 42, 46, 48, 52, 52, 52, 52, 54, 56, 59–61, 63, 63, 63–65, 68–69, 71–72, 76, 80, 82, 86, 86, 86, 86, 88, 90, 93–95
src/utils
   workpackageHelper.js92.56%94.87%88.89%91.78%102–104, 106, 27, 57, 57–58
src/views
   CreateWorkPackageModal.vue87.10%81.48%86.36%89.83%110, 137, 153, 371–372, 374–375, 379, 395, 512, 512, 512–513, 515, 520–521, 523–524, 53, 530–531, 533–534, 541, 541, 541–542, 544, 547, 557, 588, 597, 604–605, 605, 605–606, 619, 641, 644, 653, 684, 692, 700, 705, 707, 707, 707–708, 719–721, 79, 92, 95
   Dashboard.vue83.59%80.60%80%86.73%118, 118, 118–119, 121, 132, 142, 145, 15, 15, 15, 15, 15, 157, 16, 16, 16, 168, 17, 213–214, 218–220, 228–229
   LinkMultipleFilesModal.vue98.36%97.30%100%98.48%156–157
   ProjectsTab.vue86.11%83.93%83.33%88.30%103–105, 118, 142, 153–154, 189, 189, 189–192, 194, 197, 224, 248–249, 259, 269
   WorkPackagePickerElement.vue0%0%0%0%100–101, 101, 101, 101, 101–102, 104, 14, 14, 14, 17–18, 18, 39, 48, 57, 6, 60, 63, 63, 63, 63, 63–64, 66, 66, 66, 66, 66–67, 69, 7, 73, 77, 80, 80, 80–82, 84–86, 88–89, 89, 89–92, 95, 98–99, 99, 99, 99, 99, 99
   WorkPackageReferenceWidget.vue0%0%0%0%18, 33, 58, 66, 7, 71,

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

PHP Code Coverage

Coverage after merging port/fix/upgrade-test into master will be
72.30%
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
   ServerVersion.php0%100%0%0%17, 27–29, 32, 41–42
   TokenEventFactory.php100%100%100%100%
integration_openproject/server/apps/integration_openproject/lib/AppInfo
   Application.php38.27%100%50%37.33%128–130, 133–147, 150, 152, 154–155, 158, 163–164, 168–170, 172–183, 185, 188, 192, 196–198, 231
integration_openproject/server/apps/integration_openproject/lib/AuditLog
   Operation.php100%100%100%100%
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.php87.38%100%88.89%87.31%216, 402–404, 406–408, 457, 546, 562–565, 573, 577–580, 622–637, 678, 682–684, 686–688, 693–696, 713–716
   DirectDownloadController.php0%100%0%0%33–35, 50–52, 54–61
   DirectUploadController.php53.85%100%75%53.10%134–136, 198–201, 204–210, 212, 214, 220–222, 230–232, 234–236, 238–240, 245–256, 259–263, 272–273, 276–278, 282–284
   FilesController.php85.83%100%83.33%85.95%181–182, 246, 255, 272–275, 280–282, 287–289, 301, 303, 306
   OpenProjectAPIController.php81.09%100%82.35%80.98%116, 155, 202–204, 207–214, 216–220, 222, 241, 266, 331, 381, 401, 448, 473–475, 478–482, 484, 66
   OpenProjectController.php96.45%100%80%96.95%244–248
integration_openproject/server/apps/integration_openproject/lib/Dashboard
   OpenProjectWidget.php0%100%0%0%101, 108, 115–116, 118–123, 125–129, 131–133, 136–147, 67–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.php100%100%100%100%
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, 67, 69–70, 72, 74–77, 79–81
   BeforeUserDeletedListener.php40%100%50%37.50%30, 38, 42–43, 45
   LoadAdditionalScriptsListener.php0%100%0%0%37–38, 46–47, 49, 51–52, 54
   LoadSidebarScript.php67.39%100%100%65.91%100–102, 109, 112, 119, 91–99
   OpenProjectReferenceListener.php95.65%100%100%95.24%60
   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
   UserLoggedInEventListener.php0%100%0%0%27, 35–36, 39, 42
integration_openproject/server/apps/integration_openproject/lib/Migration
   Version2001Date20221213083550.php0%100%0%0%30, 41–43, 46–54, 56–64, 66–68, 70
   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, 41–44, 46
   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%102–104, 107, 111, 145, 153–154, 162, 40, 47, 54, 61–63, 90, 96–99
integration_openproject/server/apps/integration_openproject/lib/Search
   OpenProjectSearchProvider.php0%100%0%0%102–106, 108–111, 113–115, 118–119, 121–122, 125–134, 136–140, 60–64, 71, 78, 86, 88, 91, 98–99
   OpenProjectSearchResultEntry.php100%100%100%100%
integration_openproject/server/apps/integration_openproject/lib/Service
   DatabaseService.php43.14%100%60%41.30%107–111, 113, 63–76, 78–84
   DirectDownloadService.php100%100%100%100%
   DirectUploadService.php74.32%100%80%73.91%111, 167, 174, 200, 203, 78–81, 83–91
   OauthService.php96.15%100%100%95.65%124, 144
   OpenProjectAPIService.php79.71%100%80.28%79.67%1004, 1032–1033, 1035, 1037–1038, 1085–1087, 1089–1091, 1094–1098, 1100–1102, 1112–1115, 1118–1120, 1122, 1125–1131, 1135–1136, 1168,

on:
schedule:
- cron: '0 22 * * *' # run at 10 PM UTC
pull_request:

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 can remove this now

BRANCH_VERSION=$(grep -oPm1 '(?<=<version>)[^<]+' integration_openproject/appinfo/info.xml | sed 's/-.*//')
SERIES=$(echo "$BRANCH_VERSION" | cut -d. -f1,2)

STABLE_RELEASE_TAGS=$(gh release list --repo "${REPO}" --json tagName -q '.[].tagName' \

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 should be possible to use GITHUB_REPOSITORY directly.

Suggested change
STABLE_RELEASE_TAGS=$(gh release list --repo "${REPO}" --json tagName -q '.[].tagName' \
STABLE_RELEASE_TAGS=$(gh release list --repo "${GITHUB_REPOSITORY}" --json tagName -q '.[].tagName' \

- name: Install stable integration_openproject app
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}

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
REPO: ${{ github.repository }}

GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
run: |
BRANCH_VERSION=$(grep -oPm1 '(?<=<version>)[^<]+' integration_openproject/appinfo/info.xml | sed 's/-.*//')

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 can omit sed

Suggested change
BRANCH_VERSION=$(grep -oPm1 '(?<=<version>)[^<]+' integration_openproject/appinfo/info.xml | sed 's/-.*//')
BRANCH_VERSION=$(grep -oPm1 '(?<=<version>)[^<][\d.]+' integration_openproject/appinfo/info.xml')

REPO: ${{ github.repository }}
run: |
BRANCH_VERSION=$(grep -oPm1 '(?<=<version>)[^<]+' integration_openproject/appinfo/info.xml | sed 's/-.*//')
SERIES=$(echo "$BRANCH_VERSION" | cut -d. -f1,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.

Suggested change
SERIES=$(echo "$BRANCH_VERSION" | cut -d. -f1,2)
SERIES=$(echo "$BRANCH_VERSION" | cut -d . -f1,2)

SERIES=$(echo "$BRANCH_VERSION" | cut -d. -f1,2)

STABLE_RELEASE_TAGS=$(gh release list --repo "${REPO}" --json tagName -q '.[].tagName' \
| grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -rV)

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
| grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -rV)
| grep -P '^[\d.]+$' | sort -rV)

fi
[ -n "$TAG" ] || { echo "No stable release found"; exit 1; }

gh release download "${TAG}" --repo "${REPO}" --pattern '*.tar.gz' --dir /tmp/app

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
gh release download "${TAG}" --repo "${REPO}" --pattern '*.tar.gz' --dir /tmp/app
# download and enable the app
gh release download "${TAG}" --repo "${REPO}" --pattern '*.tar.gz' --dir /tmp/app

Comment on lines +120 to +122
if [ -z "$TAG" ]; then
TAG=$(echo "${STABLE_RELEASE_TAGS}" | head -n1)
fi

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
if [ -z "$TAG" ]; then
TAG=$(echo "${STABLE_RELEASE_TAGS}" | head -n1)
fi
if [ -z "$TAG" ]; then
TAG=$(echo "${STABLE_RELEASE_TAGS}" | head -n1)
fi

BRANCH_VERSION=$(grep -oPm1 '(?<=<version>)[^<]+' integration_openproject/appinfo/info.xml | sed 's/-.*//')
SERIES=$(echo "$BRANCH_VERSION" | cut -d. -f1,2)

STABLE_RELEASE_TAGS=$(gh release list --repo "${REPO}" --json tagName -q '.[].tagName' \

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
STABLE_RELEASE_TAGS=$(gh release list --repo "${REPO}" --json tagName -q '.[].tagName' \
# sorted list of stable releases (excluding nightly releases)
STABLE_RELEASE_TAGS=$(gh release list --repo "${REPO}" --json tagName -q '.[].tagName' \

Comment on lines +111 to +118
TAG=$(echo "${STABLE_RELEASE_TAGS}" | grep "^v${SERIES}\." \
| while read -r t; do
version="${t#v}"
if [ "$(printf '%s\n%s\n' "$version" "$BRANCH_VERSION" | sort -V | head -n1)" = "$version" ]; then
echo "$t"
break
fi
done)

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.

maybe we can do this. get the patch list and grab the first one as it will be the latest one.

Suggested change
TAG=$(echo "${STABLE_RELEASE_TAGS}" | grep "^v${SERIES}\." \
| while read -r t; do
version="${t#v}"
if [ "$(printf '%s\n%s\n' "$version" "$BRANCH_VERSION" | sort -V | head -n1)" = "$version" ]; then
echo "$t"
break
fi
done)
PATCH_VERSIONS=$(echo "${STABLE_RELEASE_TAGS}" | grep "v${SERIES}")
LATEST_TAG=$(echo "${PATCH_VERSIONS}" | head -n1)

fi
done)

if [ -z "$TAG" ]; then

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
if [ -z "$TAG" ]; then
if [ -z "$LATEST_TAG" ]; then

This branch has not been deployed

No deployments
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.

2 participants