diff --git a/.github/scripts/generate-matrix.sh b/.github/scripts/generate-matrix.sh index faa092c77..eb7997169 100755 --- a/.github/scripts/generate-matrix.sh +++ b/.github/scripts/generate-matrix.sh @@ -155,8 +155,6 @@ for ncVersion in $nextcloudVersions; do phpVersion="8.1" elif [ "$ncVersion" = "stable30" ]; then phpVersion="8.2" - elif [ "$ncVersion" = "master" ]; then - phpVersion="8.3" else phpVersion="$defaultPhpVersion" fi diff --git a/.github/workflows/notify-app-release.yml b/.github/workflows/notify-app-release.yml index f3bedc6aa..459fe32ab 100644 --- a/.github/workflows/notify-app-release.yml +++ b/.github/workflows/notify-app-release.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Check and notify releases env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 16d63fc60..e58f65da7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: tools: php-cs-fixer, phpunit - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Get current tag id: tag diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index 0d8e1962a..5d8e17678 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@v6 with: persist-credentials: false diff --git a/.github/workflows/shared_workflow.yml b/.github/workflows/shared_workflow.yml index 1972d643c..8110e16ee 100644 --- a/.github/workflows/shared_workflow.yml +++ b/.github/workflows/shared_workflow.yml @@ -25,13 +25,13 @@ jobs: steps: - name: Checkout for nightly CI if: github.event_name == 'schedule' - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: ref: ${{ inputs.branch }} - name: Checkout if: github.event_name != 'schedule' - uses: actions/checkout@v3 + uses: actions/checkout@v6 - name: Read package.json node and npm engines version uses: skjnldsv/read-package-engines-version-actions@v2 @@ -78,22 +78,17 @@ jobs: create-matrix: runs-on: ubuntu-22.04 steps: - - name: Checkout for nightly CI - if: github.event_name == 'schedule' - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v6 with: ref: ${{ inputs.branch }} - - name: Checkout - if: github.event_name != 'schedule' - uses: actions/checkout@v3 - - name: Create matrix id: create-matrix env: NEXTCLOUD_VERSIONS: ${{ inputs.nextcloud_versions }} PHP_VERSIONS: ${{ inputs.php_versions }} - DEFAULT_PHP_VERSION: "8.2" + DEFAULT_PHP_VERSION: "8.3" DEFAULT_DATABASE: "mysql" EXTRA_DATABASES: "pgsql" run: | @@ -139,7 +134,7 @@ jobs: POSTGRES_DB: nextcloud database-mysql: - image: ghcr.io/nextcloud/continuous-integration-mariadb-10.5:latest + image: ghcr.io/nextcloud/continuous-integration-mariadb-10.6:latest env: MYSQL_ROOT_PASSWORD: 'nextcloud' MYSQL_PASSWORD: 'nextcloud' @@ -151,51 +146,44 @@ jobs: options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - - name: Checkout for nightly CI - if: github.event_name == 'schedule' - uses: actions/checkout@v3 - with: - path: integration_openproject - ref: ${{ inputs.branch }} - - name: Checkout - if: github.event_name != 'schedule' - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: path: integration_openproject + ref: ${{ inputs.branch }} - name: Checkout activity app - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: repository: nextcloud/activity path: activity ref: ${{ matrix.nextcloudVersion }} - name: Checkout groupfolders app - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: repository: nextcloud/groupfolders path: groupfolders ref: ${{ matrix.nextcloudVersion }} - name: Checkout user_oidc app - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: repository: nextcloud/user_oidc - ref: v7.2.0 + ref: v8.2.2 fetch-tags: true path: user_oidc - name: Checkout oidc app - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: repository: h2CK/oidc - ref: 1.6.0 + ref: 1.14.5 fetch-tags: true path: oidc - name: Checkout server (for phpunit and psalm) - uses: actions/checkout@v3 + uses: actions/checkout@v6 with: submodules: true repository: nextcloud/server @@ -221,31 +209,29 @@ jobs: key: ${{ runner.os }}-composer-${{ hashFiles('./composer.lock') }} restore-keys: ${{ runner.os }}-composer- - - name: Setup server and apps + - name: Install PHP dependencies + run: composer install --no-progress --prefer-dist --optimize-autoloader + + - name: Prepare Nextcloud server (for phpunit and psalm) run: | - # integration_openproject app - composer install --no-progress --prefer-dist --optimize-autoloader - # user_oidc app - composer install --no-interaction --prefer-dist --optimize-autoloader --working-dir=../user_oidc - cd server && ./occ maintenance:install --admin-pass=admin + cd server + ./occ maintenance:install --admin-pass=admin - name: PHP code analysis and linting run: | make psalm make phpcs || ( echo 'Please run `make phpcs-fix` to format your code' && exit 1 ) - - name: Enable apps + - name: Enable apps (for phpunit) run: | mkdir -p server/apps/integration_openproject cp -r `ls -A | grep -v 'server'` server/apps/integration_openproject/ - cp -r ../groupfolders ../activity server/apps - cd server - ./occ a:e groupfolders integration_openproject activity - if [ "${{matrix.nextcloudVersion}}" != "stable27" ]; then - cp -r ../../user_oidc ../../oidc apps - ./occ a:e -f user_oidc - # enable app even if it is not compatible with the current server version - ./occ a:e -f oidc + cp -r ../groupfolders ../activity ../user_oidc ../oidc server/apps + if [ "${{matrix.nextcloudVersion}}" == "master" ]; then + # enable app even if it is not compatible with the master branch + ./server/occ a:e -f oidc user_oidc activity groupfolders integration_openproject + else + ./server/occ a:e oidc user_oidc activity groupfolders integration_openproject fi - name: PHP Unit Tests @@ -300,11 +286,8 @@ jobs: # Disable share rate limit protection docker exec nextcloud /bin/bash -c 'occ config:system:set ratelimit.protection.enabled --value false --type bool' - - name: API Tests - env: - NEXTCLOUD_BASE_URL: http://localhost + - name: Wait for Nextcloud server to be ready run: | - composer install --no-progress --prefer-dist --optimize-autoloader if ! timeout 5m bash -c ' until curl -s -f http://localhost/status.php | grep '"'"'"installed":true'"'"'; do echo "[INFO] Waiting for server to be ready..." @@ -314,7 +297,11 @@ jobs: echo "[ERROR] Server not ready within 5 minutes." exit 1 fi - make api-test + + - name: API Tests + env: + NEXTCLOUD_BASE_URL: http://localhost + run: make api-test notify-nightly-report: needs: @@ -324,7 +311,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Notify nightly report to element env: