Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/impersonate.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2022-04-04 12:58:52 +0300
committerGitHub <noreply@github.com>2022-04-04 12:58:52 +0300
commit0504d06b0f49257e6777b6b460da485a191928d8 (patch)
tree8b1c1ac556811af002a4604b72d631ab137e90b9
parent1082b2c6b0b9ab7736cdd830e0ac73a777287168 (diff)
parentbd1f7b2b1f0690523a176bb57770eb5655e29f38 (diff)
Merge pull request #152 from nextcloud/update-master-php-testing-versions
Update master php testing versions
-rw-r--r--.github/workflows/lint.yml2
-rw-r--r--.github/workflows/phpunit.yml58
-rw-r--r--composer.json1
-rw-r--r--tests/phpunit.xml (renamed from tests/unit/phpunit.xml)6
4 files changed, 42 insertions, 25 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index b21df91..0272d0c 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
- php-versions: ['7.4', '8.0']
+ php-versions: ['7.4', '8.0', "8.1"]
name: php${{ matrix.php-versions }}
steps:
diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml
index 9c6a995..386003c 100644
--- a/.github/workflows/phpunit.yml
+++ b/.github/workflows/phpunit.yml
@@ -22,7 +22,7 @@ jobs:
databases: ['sqlite']
server-versions: ['master']
- name: php${{ matrix.php-versions }}-${{ matrix.databases }}
+ name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
steps:
- name: Checkout server
@@ -47,22 +47,26 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
+ tools: phpunit
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite
- tools: phpunit:8.5.13
coverage: none
+ - name: Set up PHPUnit
+ working-directory: apps/${{ env.APP_NAME }}
+ run: composer i
+
- name: Set up Nextcloud
env:
DB_PORT: 4444
run: |
mkdir data
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
- php -f index.php
./occ app:enable --force ${{ env.APP_NAME }}
+ php -S localhost:8080 &
- name: PHPUnit
- working-directory: apps/${{ env.APP_NAME }}/tests/unit
- run: phpunit -c phpunit.xml
+ working-directory: apps/${{ env.APP_NAME }}/tests
+ run: ../vendor/bin/phpunit -c phpunit.xml
mysql:
runs-on: ubuntu-latest
@@ -71,11 +75,11 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
- php-versions: ['7.4', '8.0']
+ php-versions: ['7.4', '8.0', '8.1']
databases: ['mysql']
server-versions: ['master']
- name: php${{ matrix.php-versions }}-${{ matrix.databases }}
+ name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
services:
mysql:
@@ -109,22 +113,26 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql
- tools: phpunit:8.5.13
+ tools: phpunit
+ extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql, zip, gd
coverage: none
+ - name: Set up PHPUnit
+ working-directory: apps/${{ env.APP_NAME }}
+ run: composer i
+
- name: Set up Nextcloud
env:
DB_PORT: 4444
run: |
mkdir data
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
- php -f index.php
./occ app:enable --force ${{ env.APP_NAME }}
+ php -S localhost:8080 &
- name: PHPUnit
- working-directory: apps/${{ env.APP_NAME }}/tests/unit
- run: phpunit -c phpunit.xml
+ working-directory: apps/${{ env.APP_NAME }}/tests
+ run: ../vendor/bin/phpunit -c phpunit.xml
pgsql:
runs-on: ubuntu-latest
@@ -137,7 +145,7 @@ jobs:
databases: ['pgsql']
server-versions: ['master']
- name: php${{ matrix.php-versions }}-${{ matrix.databases }}
+ name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
services:
postgres:
@@ -173,22 +181,26 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
+ tools: phpunit
extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql
- tools: phpunit:8.5.13
coverage: none
+ - name: Set up PHPUnit
+ working-directory: apps/${{ env.APP_NAME }}
+ run: composer i
+
- name: Set up Nextcloud
env:
DB_PORT: 4444
run: |
mkdir data
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
- php -f index.php
./occ app:enable --force ${{ env.APP_NAME }}
+ php -S localhost:8080 &
- name: PHPUnit
- working-directory: apps/${{ env.APP_NAME }}/tests/unit
- run: phpunit -c phpunit.xml
+ working-directory: apps/${{ env.APP_NAME }}/tests
+ run: ../vendor/bin/phpunit -c phpunit.xml
oci:
runs-on: ubuntu-latest
@@ -201,7 +213,7 @@ jobs:
databases: ['oci']
server-versions: ['master']
- name: php${{ matrix.php-versions }}-${{ matrix.databases }}
+ name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }}
services:
oracle:
@@ -233,9 +245,13 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, iconv, fileinfo, intl, oci8
- tools: phpunit:8.5.13
+ tools: phpunit
coverage: none
+ - name: Set up PHPUnit
+ working-directory: apps/${{ env.APP_NAME }}
+ run: composer i
+
- name: Set up Nextcloud
run: |
mkdir data
@@ -244,5 +260,5 @@ jobs:
./occ app:enable --force ${{ env.APP_NAME }}
- name: PHPUnit
- working-directory: apps/${{ env.APP_NAME }}/tests/unit
- run: phpunit -c phpunit.xml
+ working-directory: apps/${{ env.APP_NAME }}/tests
+ run: ../vendor/bin/phpunit -c phpunit.xml
diff --git a/composer.json b/composer.json
index 22673b2..0df69ae 100644
--- a/composer.json
+++ b/composer.json
@@ -11,6 +11,7 @@
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l"
},
"require-dev": {
+ "phpunit/phpunit": "^9.5",
"nextcloud/coding-standard": "^0.5.0",
"christophwurst/nextcloud": "dev-master"
}
diff --git a/tests/unit/phpunit.xml b/tests/phpunit.xml
index f246d3f..92f058a 100644
--- a/tests/unit/phpunit.xml
+++ b/tests/phpunit.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
-<phpunit bootstrap="bootstrap.php"
+<phpunit bootstrap="unit/bootstrap.php"
strict="true"
verbose="true"
timeoutForSmallTests="900"
@@ -12,9 +12,9 @@
<!-- filters for code coverage -->
<filter>
<whitelist>
- <directory suffix=".php">../../../impersonate</directory>
+ <directory suffix=".php">../../impersonate</directory>
<exclude>
- <directory suffix=".php">../../../impersonate/tests</directory>
+ <directory suffix=".php">../../impersonate/tests</directory>
</exclude>
</whitelist>
</filter>