From ff7a1087f2ad1856f96b286cdb2036aedfeb9258 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 26 Feb 2026 09:09:19 +0545 Subject: [PATCH 1/6] test path Signed-off-by: nabim777 --- .github/scripts/upgrade-integration-app.sh | 6 +++ .github/workflows/ci-workflow.yml | 50 +++++++++++----------- .github/workflows/upgrade-testing.yml | 45 +++++++++++++++++++ 3 files changed, 76 insertions(+), 25 deletions(-) create mode 100644 .github/scripts/upgrade-integration-app.sh create mode 100644 .github/workflows/upgrade-testing.yml diff --git a/.github/scripts/upgrade-integration-app.sh b/.github/scripts/upgrade-integration-app.sh new file mode 100644 index 000000000..f03169a74 --- /dev/null +++ b/.github/scripts/upgrade-integration-app.sh @@ -0,0 +1,6 @@ +php occ maintenance:mode --on +php occ app:update --allow-unstable integration_openproject +php occ db:add-missing-columns +php occ db:add-missing-indices +php occ db:add-missing-primary-keys +php occ maintenance:mode --off \ No newline at end of file diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index e360e6a89..ecb9997af 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -1,28 +1,28 @@ -# SPDX-FileCopyrightText: 2023 Jankari Tech Pvt. Ltd. -# SPDX-License-Identifier: AGPL-3.0-or-later -name: CI +# # SPDX-FileCopyrightText: 2023 Jankari Tech Pvt. Ltd. +# # SPDX-License-Identifier: AGPL-3.0-or-later +# name: CI -on: - push: - branches: - - 'master' - pull_request: - paths-ignore: - - '**.md' - - '**.txt' - - '**.sh' - - 'dev/**' - - 'l10n/**' - - 'img/**' - - 'docker-compose*' +# on: +# push: +# branches: +# - 'master' +# pull_request: +# paths-ignore: +# - '**.md' +# - '**.txt' +# - '**.sh' +# - 'dev/**' +# - 'l10n/**' +# - 'img/**' +# - 'docker-compose*' -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true -jobs: - builds: - uses: ./.github/workflows/shared_workflow.yml - secrets: inherit - with: - branch: master +# jobs: +# builds: +# uses: ./.github/workflows/shared_workflow.yml +# secrets: inherit +# with: +# branch: master diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml new file mode 100644 index 000000000..1124abebd --- /dev/null +++ b/.github/workflows/upgrade-testing.yml @@ -0,0 +1,45 @@ +# SPDX-FileCopyrightText: 2023 Jankari Tech Pvt. Ltd. +# SPDX-License-Identifier: AGPL-3.0-or-later +name: CI + +on: + push: + branches: + - 'master' + pull_request: + paths-ignore: + - '**.md' + - '**.txt' + - '**.sh' + - 'dev/**' + - 'l10n/**' + - 'img/**' + - 'docker-compose*' + +jobs: + builds: + name: Build and Test + runs-on: ubuntu-latest + steps: + - name: Checkout server (for phpunit and psalm) + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + with: + submodules: true + repository: nextcloud/server + path: server + ref: stable33 + + - name: path checking + run: | + pwd + ls -l + cd integration_openproject + ls -l + + - name: path check + run: | + git clone https://github.com/nextcloud/integration_openproject.git + cd integration_openproject + git checkout release/3.0 + git branch + git pull \ No newline at end of file From a23743442e09d946e399df0110beb8f98aa5862e Mon Sep 17 00:00:00 2001 From: nabim777 Date: Tue, 10 Mar 2026 16:29:41 +0545 Subject: [PATCH 2/6] use checkout Signed-off-by: nabim777 --- .github/workflows/upgrade-testing.yml | 40 ++++++++++++++++++--------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index 1124abebd..31e22b0d6 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -1,11 +1,11 @@ # SPDX-FileCopyrightText: 2023 Jankari Tech Pvt. Ltd. # SPDX-License-Identifier: AGPL-3.0-or-later -name: CI +name: Upgrade Testing on: push: branches: - - 'master' + - 'master' pull_request: paths-ignore: - '**.md' @@ -29,17 +29,31 @@ jobs: path: server ref: stable33 - - name: path checking + - name: Checkout integration_openproject app (initial version) + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + with: + repository: nextcloud/integration_openproject + path: server/apps/integration_openproject + ref: master # or the initial branch/tag before upgrade + + - name: Install server and enable integration_openproject app run: | - pwd - ls -l - cd integration_openproject - ls -l + cd server/apps/integration_openproject + make + php ../../occ maintenance:install --admin-pass=admin + php ../../occ a:e integration_openproject - - name: path check + - name: Checkout integration_openproject app (release version for upgrade) + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + with: + repository: nextcloud/integration_openproject + path: server/apps/integration_openproject + ref: release/3.0 # the version to upgrade to + + - name: Update integration_openproject app + working-directory: server/apps/integration_openproject run: | - git clone https://github.com/nextcloud/integration_openproject.git - cd integration_openproject - git checkout release/3.0 - git branch - git pull \ No newline at end of file + pwd + ls + php ../../occ upgrade + php ../../occ app:update --allow-unstable integration_openproject \ No newline at end of file From a4ed16b3f9e2b1f769a89053f5cfa605ed2a6913 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 19 Mar 2026 09:43:43 +0545 Subject: [PATCH 3/6] add api tests Signed-off-by: nabim777 --- .github/workflows/upgrade-testing.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index 31e22b0d6..13c90aab8 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -39,8 +39,7 @@ jobs: - name: Install server and enable integration_openproject app run: | cd server/apps/integration_openproject - make - php ../../occ maintenance:install --admin-pass=admin + php ../../occ maintenance:install --admin-pass=admin php ../../occ a:e integration_openproject - name: Checkout integration_openproject app (release version for upgrade) @@ -56,4 +55,11 @@ jobs: pwd ls php ../../occ upgrade - php ../../occ app:update --allow-unstable integration_openproject \ No newline at end of file + php ../../occ app:update --allow-unstable integration_openproject + + - name: API Tests + env: + NEXTCLOUD_BASE_URL: http://localhost + run: | + cd server/apps/integration_openproject + make api-test \ No newline at end of file From df76c6c1f15fd9f4a70a9792187647a37297bcb5 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 19 Mar 2026 12:52:48 +0545 Subject: [PATCH 4/6] direct on sharedworkflow Signed-off-by: nabim777 --- .github/workflows/ci-workflow.yml | 50 +++++------ .github/workflows/shared_workflow.yml | 121 +++++++++++++------------- .github/workflows/upgrade-testing.yml | 117 +++++++++++++------------ 3 files changed, 145 insertions(+), 143 deletions(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index ecb9997af..e360e6a89 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -1,28 +1,28 @@ -# # SPDX-FileCopyrightText: 2023 Jankari Tech Pvt. Ltd. -# # SPDX-License-Identifier: AGPL-3.0-or-later -# name: CI +# SPDX-FileCopyrightText: 2023 Jankari Tech Pvt. Ltd. +# SPDX-License-Identifier: AGPL-3.0-or-later +name: CI -# on: -# push: -# branches: -# - 'master' -# pull_request: -# paths-ignore: -# - '**.md' -# - '**.txt' -# - '**.sh' -# - 'dev/**' -# - 'l10n/**' -# - 'img/**' -# - 'docker-compose*' +on: + push: + branches: + - 'master' + pull_request: + paths-ignore: + - '**.md' + - '**.txt' + - '**.sh' + - 'dev/**' + - 'l10n/**' + - 'img/**' + - 'docker-compose*' -# concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true -# jobs: -# builds: -# uses: ./.github/workflows/shared_workflow.yml -# secrets: inherit -# with: -# branch: master +jobs: + builds: + uses: ./.github/workflows/shared_workflow.yml + secrets: inherit + with: + branch: master diff --git a/.github/workflows/shared_workflow.yml b/.github/workflows/shared_workflow.yml index ac03c1ddd..4207cf891 100644 --- a/.github/workflows/shared_workflow.yml +++ b/.github/workflows/shared_workflow.yml @@ -19,61 +19,61 @@ on: name: CI jobs: - js-lint-unit: - name: js lint and unit tests - runs-on: ubuntu-22.04 - steps: - - name: Checkout - if: github.event_name != 'schedule' - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 - - - name: Checkout (Nightly) - if: github.event_name == 'schedule' - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 - with: - ref: ${{ inputs.branch }} - - - name: Read package.json node and npm engines version - uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 - id: versions - with: - fallbackNode: '^20' - fallbackNpm: '^10' - - - name: Setup NodeJS ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 - with: - node-version: ${{ steps.versions.outputs.nodeVersion }} - cache: 'npm' - - - name: Setup NPM ${{ steps.versions.outputs.npmVersion }} - run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - - - name: Install NPM Dependencies - run: npm install - - - name: JS Lint - run: make lint-js || ( echo 'Please run `make lint-js-fix` to format your code' && exit 1 ) - - - name: Vue Unit tests - run: | - make jsunit - - - name: JS Code Coverage Summary Report - if: ${{ github.event_name == 'pull_request' }} - uses: romeovs/lcov-reporter-action@dda1c9b1fa1622b225e9acd87a248751dbcc6ada - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - lcov-file: ./coverage/jest/lcov.info - delete-old-comments: true - title: "JS Code Coverage" - - - name: JS coverage check - if: ${{ github.event_name == 'pull_request' }} - uses: VeryGoodOpenSource/very_good_coverage@3b475421464c564c0714d92ce02742bd81fa9eda - with: - min_coverage: '59' - path: './coverage/jest/lcov.info' + # js-lint-unit: + # name: js lint and unit tests + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout + # if: github.event_name != 'schedule' + # uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + + # - name: Checkout (Nightly) + # if: github.event_name == 'schedule' + # uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + # with: + # ref: ${{ inputs.branch }} + + # - name: Read package.json node and npm engines version + # uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 + # id: versions + # with: + # fallbackNode: '^20' + # fallbackNpm: '^10' + + # - name: Setup NodeJS ${{ steps.versions.outputs.nodeVersion }} + # uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 + # with: + # node-version: ${{ steps.versions.outputs.nodeVersion }} + # cache: 'npm' + + # - name: Setup NPM ${{ steps.versions.outputs.npmVersion }} + # run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" + + # - name: Install NPM Dependencies + # run: npm install + + # - name: JS Lint + # run: make lint-js || ( echo 'Please run `make lint-js-fix` to format your code' && exit 1 ) + + # - name: Vue Unit tests + # run: | + # make jsunit + + # - name: JS Code Coverage Summary Report + # if: ${{ github.event_name == 'pull_request' }} + # uses: romeovs/lcov-reporter-action@dda1c9b1fa1622b225e9acd87a248751dbcc6ada + # with: + # github-token: ${{ secrets.GITHUB_TOKEN }} + # lcov-file: ./coverage/jest/lcov.info + # delete-old-comments: true + # title: "JS Code Coverage" + + # - name: JS coverage check + # if: ${{ github.event_name == 'pull_request' }} + # uses: VeryGoodOpenSource/very_good_coverage@3b475421464c564c0714d92ce02742bd81fa9eda + # with: + # min_coverage: '59' + # path: './coverage/jest/lcov.info' create-matrix: runs-on: ubuntu-22.04 @@ -148,11 +148,12 @@ jobs: options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - - name: Checkout + - name: Checkout (initial) if: github.event_name != 'schedule' uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 with: path: integration_openproject + ref: ${{ github.event.pull_request.base.ref }} - name: Checkout (Nightly) if: github.event_name == 'schedule' @@ -217,12 +218,12 @@ jobs: key: ${{ runner.os }}-composer-${{ hashFiles('./composer.lock') }} restore-keys: ${{ runner.os }}-composer- - - name: Install PHP dependencies - run: composer install --no-progress --prefer-dist --optimize-autoloader - - name: Prepare Nextcloud server (for phpunit and psalm) run: server/occ maintenance:install --admin-pass=admin + - name: Install PHP dependencies + run: composer install --no-progress --prefer-dist --optimize-autoloader + - name: PHP code analysis and linting run: | make psalm @@ -330,7 +331,7 @@ jobs: notify-nightly-report: needs: - - js-lint-unit + # - js-lint-unit - api-phpunit-tests if: ${{ always() && github.event_name == 'schedule' }} runs-on: ubuntu-22.04 diff --git a/.github/workflows/upgrade-testing.yml b/.github/workflows/upgrade-testing.yml index 13c90aab8..9011005c1 100644 --- a/.github/workflows/upgrade-testing.yml +++ b/.github/workflows/upgrade-testing.yml @@ -1,65 +1,66 @@ -# SPDX-FileCopyrightText: 2023 Jankari Tech Pvt. Ltd. -# SPDX-License-Identifier: AGPL-3.0-or-later -name: Upgrade Testing +# # SPDX-FileCopyrightText: 2023 Jankari Tech Pvt. Ltd. +# # SPDX-License-Identifier: AGPL-3.0-or-later +# name: Upgrade Testing -on: - push: - branches: - - 'master' - pull_request: - paths-ignore: - - '**.md' - - '**.txt' - - '**.sh' - - 'dev/**' - - 'l10n/**' - - 'img/**' - - 'docker-compose*' +# on: +# push: +# branches: +# - 'master' +# pull_request: +# paths-ignore: +# - '**.md' +# - '**.txt' +# - '**.sh' +# - 'dev/**' +# - 'l10n/**' +# - 'img/**' +# - 'docker-compose*' -jobs: - builds: - name: Build and Test - runs-on: ubuntu-latest - steps: - - name: Checkout server (for phpunit and psalm) - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 - with: - submodules: true - repository: nextcloud/server - path: server - ref: stable33 +# jobs: +# builds: +# name: Build and Test +# runs-on: ubuntu-latest +# steps: +# - name: Checkout server (for phpunit and psalm) +# uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 +# with: +# submodules: true +# repository: nextcloud/server +# path: server +# ref: stable33 - - name: Checkout integration_openproject app (initial version) - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 - with: - repository: nextcloud/integration_openproject - path: server/apps/integration_openproject - ref: master # or the initial branch/tag before upgrade +# - name: Checkout integration_openproject app (initial version) +# uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 +# with: +# repository: nextcloud/integration_openproject +# path: server/apps/integration_openproject +# ref: master # or the initial branch/tag before upgrade - - name: Install server and enable integration_openproject app - run: | - cd server/apps/integration_openproject - php ../../occ maintenance:install --admin-pass=admin - php ../../occ a:e integration_openproject +# - name: Install server and enable integration_openproject app +# run: | +# cd server/apps/integration_openproject +# php ../../occ maintenance:install --admin-pass=admin +# php ../../occ a:e integration_openproject - - name: Checkout integration_openproject app (release version for upgrade) - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 - with: - repository: nextcloud/integration_openproject - path: server/apps/integration_openproject - ref: release/3.0 # the version to upgrade to +# - name: Checkout integration_openproject app (release version for upgrade) +# uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 +# with: +# repository: nextcloud/integration_openproject +# path: server/apps/integration_openproject +# ref: release/3.0 # the version to upgrade to - - name: Update integration_openproject app - working-directory: server/apps/integration_openproject - run: | - pwd - ls - php ../../occ upgrade - php ../../occ app:update --allow-unstable integration_openproject +# - name: Update integration_openproject app +# working-directory: server/apps/integration_openproject +# run: | +# pwd +# ls +# php ../../occ upgrade +# php ../../occ app:update --allow-unstable integration_openproject - - name: API Tests - env: - NEXTCLOUD_BASE_URL: http://localhost - run: | - cd server/apps/integration_openproject - make api-test \ No newline at end of file +# - name: API Tests +# env: +# NEXTCLOUD_BASE_URL: http://localhost +# run: | +# cd server/apps/integration_openproject +# ls +# make api-test \ No newline at end of file From 0c3f54ce1af91f62dd1a684c27811ba2419a27f1 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 19 Mar 2026 13:13:43 +0545 Subject: [PATCH 5/6] enable apps Signed-off-by: nabim777 --- .github/workflows/shared_workflow.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/shared_workflow.yml b/.github/workflows/shared_workflow.yml index 4207cf891..a24521e58 100644 --- a/.github/workflows/shared_workflow.yml +++ b/.github/workflows/shared_workflow.yml @@ -221,8 +221,16 @@ jobs: - name: Prepare Nextcloud server (for phpunit and psalm) run: server/occ maintenance:install --admin-pass=admin - - name: Install PHP dependencies - run: composer install --no-progress --prefer-dist --optimize-autoloader + - name: Install PHP dependencies and enable integration_openproject app (for phpunit and psalm) + run: | + composer install --no-progress --prefer-dist --optimize-autoloader + cd server + if [ "${{matrix.nextcloudVersion}}" == "master" ]; then + # enable app even if it is not compatible with the master branch + ./occ a:e -f integration_openproject + else + ./occ a:e integration_openproject + fi - name: PHP code analysis and linting run: | From 9b6b51fed33494e04d9e91206eb58b395a9f9757 Mon Sep 17 00:00:00 2001 From: nabim777 Date: Thu, 19 Mar 2026 13:22:02 +0545 Subject: [PATCH 6/6] upgrade the apps Signed-off-by: nabim777 --- .github/workflows/shared_workflow.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/shared_workflow.yml b/.github/workflows/shared_workflow.yml index a24521e58..e99509def 100644 --- a/.github/workflows/shared_workflow.yml +++ b/.github/workflows/shared_workflow.yml @@ -221,9 +221,12 @@ jobs: - name: Prepare Nextcloud server (for phpunit and psalm) run: server/occ maintenance:install --admin-pass=admin - - name: Install PHP dependencies and enable integration_openproject app (for phpunit and psalm) + - name: Install PHP dependencies run: | composer install --no-progress --prefer-dist --optimize-autoloader + + - name: Enable integration_openproject app (for phpunit and psalm) + run: | cd server if [ "${{matrix.nextcloudVersion}}" == "master" ]; then # enable app even if it is not compatible with the master branch @@ -232,6 +235,19 @@ jobs: ./occ a:e integration_openproject fi + - name: Checkout integration_openproject app (release version for upgrade) + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 + with: + path: integration_openproject + + - name: Update integration_openproject app + run: | + pwd + ls + cd server + ./occ upgrade + ./occ app:update --allow-unstable integration_openproject + - name: PHP code analysis and linting run: | make psalm