Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/scripts/generate-matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notify-app-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
83 changes: 35 additions & 48 deletions .github/workflows/shared_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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..."
Expand All @@ -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:
Expand All @@ -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:
Expand Down
Loading