summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-09-28 13:20:49 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-10-02 11:33:14 +0200
commit0e64ec6550148757ade13dd45f444776651db639 (patch)
treed9c7c058458915be4feba676c510c47d7618ca30 /.github
parent0cb489d6caba3966f00f6e1d01790df9c6872fc2 (diff)
downloadnextcloud-server-0e64ec6550148757ade13dd45f444776651db639.tar.gz
nextcloud-server-0e64ec6550148757ade13dd45f444776651db639.zip
chore: Install phpunit via vendor bin
This means we can all run the same version. And when switching to stableX it can pull the corresponding version too. Also local dev envs and CI run the same phpunit. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ftp.yml4
-rw-r--r--.github/workflows/oci.yml5
-rw-r--r--.github/workflows/performance.yml1
-rw-r--r--.github/workflows/phpunit-32bits.yml5
-rw-r--r--.github/workflows/s3-external.yml12
-rw-r--r--.github/workflows/s3-primary-integration.yml1
-rw-r--r--.github/workflows/s3-primary.yml5
-rw-r--r--.github/workflows/sftp.yml4
8 files changed, 16 insertions, 21 deletions
diff --git a/.github/workflows/ftp.yml b/.github/workflows/ftp.yml
index dd6c3adecd5..5e79101ec7d 100644
--- a/.github/workflows/ftp.yml
+++ b/.github/workflows/ftp.yml
@@ -49,13 +49,13 @@ jobs:
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
with:
php-version: ${{ matrix.php-versions }}
- tools: phpunit:9
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Nextcloud
run: |
+ composer install
mkdir data
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
./occ app:enable --force ${{ env.APP_NAME }}
@@ -70,7 +70,7 @@ jobs:
- name: PHPUnit
run: |
echo "<?php return ['run' => true,'host' => 'localhost','user' => 'test','password' => 'test', 'root' => '${{ env.FTP_ROOT }}'];" > apps/${{ env.APP_NAME }}/tests/config.ftp.php
- phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/FtpTest.php
+ composer run test:files_external apps/files_external/tests/Storage/FtpTest.php
- name: ftpd logs
if: always()
run: |
diff --git a/.github/workflows/oci.yml b/.github/workflows/oci.yml
index f3ca7ce77b1..275e1690f9d 100644
--- a/.github/workflows/oci.yml
+++ b/.github/workflows/oci.yml
@@ -51,7 +51,6 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, oci8, openssl, pcntl, pdo_sqlite, posix, sqlite, xml, zip
- tools: phpunit:9
coverage: none
ini-file: development
env:
@@ -59,13 +58,13 @@ jobs:
- name: Set up Nextcloud
run: |
+ composer install
mkdir data
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=1521 --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
php -f index.php
- name: PHPUnit
- working-directory: tests
- run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB
+ run: composer run test:db
- name: Run repair steps
run: |
diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml
index 457727880d3..1c0db0812cc 100644
--- a/.github/workflows/performance.yml
+++ b/.github/workflows/performance.yml
@@ -26,7 +26,6 @@ jobs:
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
with:
php-version: ${{ matrix.php-versions }}
- tools: phpunit:9
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/phpunit-32bits.yml b/.github/workflows/phpunit-32bits.yml
index beafe11cdc3..8c1489a5dc3 100644
--- a/.github/workflows/phpunit-32bits.yml
+++ b/.github/workflows/phpunit-32bits.yml
@@ -44,7 +44,6 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, openssl, pdo_sqlite, posix, sqlite, xml, zip, apcu
- tools: phpunit:9
coverage: none
ini-file: development
ini-values:
@@ -56,10 +55,10 @@ jobs:
env:
DB_PORT: 4444
run: |
+ composer install
mkdir data
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=rootpassword --admin-user admin --admin-pass admin
php -f index.php
- name: PHPUnit
- working-directory: tests
- run: phpunit --configuration phpunit-autotest.xml --exclude-group PRIMARY-azure,PRIMARY-s3,PRIMARY-swift,Memcached,Redis,RoutingWeirdness
+ run: composer run test -- --exclude-group PRIMARY-azure,PRIMARY-s3,PRIMARY-swift,Memcached,Redis,RoutingWeirdness
diff --git a/.github/workflows/s3-external.yml b/.github/workflows/s3-external.yml
index 969490eb30e..c73d0aba530 100644
--- a/.github/workflows/s3-external.yml
+++ b/.github/workflows/s3-external.yml
@@ -46,13 +46,13 @@ jobs:
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
with:
php-version: ${{ matrix.php-versions }}
- tools: phpunit:9
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Nextcloud
run: |
+ composer install
mkdir data
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
./occ app:enable --force ${{ env.APP_NAME }}
@@ -60,8 +60,8 @@ jobs:
- name: PHPUnit
run: |
echo "<?php return ['run' => true, 'secret' => 'actually-not-secret', 'passwordsalt' => 'actually-not-secret', 'hostname' => 'localhost','key' => 'minio','secret' => 'minio123', 'bucket' => 'bucket', 'port' => 9000, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/${{ env.APP_NAME }}/tests/config.amazons3.php
- phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/Amazons3Test.php
- phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/VersionedAmazonS3Test.php
+ composer run test:files_external apps/files_external/tests/Storage/Amazons3Test.php
+ composer run test:files_external apps/files_external/tests/Storage/VersionedAmazonS3Test.php
- name: S3 logs
if: always()
run: |
@@ -99,13 +99,13 @@ jobs:
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
with:
php-version: ${{ matrix.php-versions }}
- tools: phpunit:9
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Nextcloud
run: |
+ composer install
mkdir data
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
./occ app:enable --force ${{ env.APP_NAME }}
@@ -113,8 +113,8 @@ jobs:
- name: PHPUnit
run: |
echo "<?php return ['run' => true,'hostname' => 'localhost','key' => 'ignored','secret' => 'ignored', 'bucket' => 'bucket', 'port' => 4566, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/${{ env.APP_NAME }}/tests/config.amazons3.php
- phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/Amazons3Test.php
- phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/VersionedAmazonS3Test.php
+ composer run test:files_external apps/files_external/tests/Storage/Amazons3Test.php
+ composer run test:files_external apps/files_external/tests/Storage/VersionedAmazonS3Test.php
- name: S3 logs
if: always()
run: |
diff --git a/.github/workflows/s3-primary-integration.yml b/.github/workflows/s3-primary-integration.yml
index ddeda1e99e2..ce1e784ef8c 100644
--- a/.github/workflows/s3-primary-integration.yml
+++ b/.github/workflows/s3-primary-integration.yml
@@ -44,7 +44,6 @@ jobs:
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
with:
php-version: ${{ matrix.php-versions }}
- tools: phpunit:9
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, redis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/s3-primary.yml b/.github/workflows/s3-primary.yml
index 4254f084adf..98f0e539e48 100644
--- a/.github/workflows/s3-primary.yml
+++ b/.github/workflows/s3-primary.yml
@@ -40,13 +40,13 @@ jobs:
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
with:
php-version: ${{ matrix.php-versions }}
- tools: phpunit:9
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Nextcloud
run: |
+ composer install
mkdir data
echo '<?php $CONFIG=["${{ matrix.key }}" => ["class" => "OC\Files\ObjectStore\S3", "arguments" => ["bucket" => "nextcloud", "autocreate" => true, "key" => "minio", "secret" => "minio123", "hostname" => "localhost", "port" => 9000, "use_ssl" => false, "use_path_style" => true, "uploadPartSize" => 52428800]]];' > config/config.php
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
@@ -58,8 +58,7 @@ jobs:
curl -f -m 1 --retry-connrefused --retry 10 --retry-delay 10 http://localhost:9000/minio/health/ready
- name: PHPUnit
- working-directory: tests
- run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB
+ run: composer run test:db
- name: S3 logs
if: always()
run: |
diff --git a/.github/workflows/sftp.yml b/.github/workflows/sftp.yml
index 7d72afc3211..8fabb2c33b2 100644
--- a/.github/workflows/sftp.yml
+++ b/.github/workflows/sftp.yml
@@ -43,13 +43,13 @@ jobs:
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
with:
php-version: ${{ matrix.php-versions }}
- tools: phpunit:9
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Nextcloud
run: |
+ composer install
mkdir data
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
./occ app:enable --force ${{ env.APP_NAME }}
@@ -57,7 +57,7 @@ jobs:
- name: PHPUnit
run: |
echo "<?php return ['run' => true, 'host' => 'localhost:2222','user' => 'test','password' => 'test', 'root' => 'data'];" > apps/${{ env.APP_NAME }}/tests/config.sftp.php
- phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/SftpTest.php
+ composer run test:files_external apps/files_external/tests/Storage/SftpTest.php
- name: sftpd logs
if: always()
run: |