From 26fc23c58e83bcc2d06dafc5f1fcd0a3030498b8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 28 Jan 2022 09:17:19 +0100 Subject: [PATCH 1/5] Update master php testing versions Signed-off-by: Joas Schilling --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b2f50fe70..a8233efbd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['7.3', '7.4', '8.0'] + php-versions: ['7.4', '8.0'] name: php${{ matrix.php-versions }} lint steps: - name: Checkout From dc1633fef0dab3ebfba8ff2a32ea5d9faf421ff7 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 28 Jan 2022 16:00:03 +0100 Subject: [PATCH 2/5] Update christophwurst/nextcloud Signed-off-by: Joas Schilling --- .github/workflows/oci.yml | 73 ----------------------------------- .github/workflows/phpunit.yml | 62 +++++++++++++++++++++++++++++ composer.lock | 12 +++--- 3 files changed, 68 insertions(+), 79 deletions(-) delete mode 100644 .github/workflows/oci.yml diff --git a/.github/workflows/oci.yml b/.github/workflows/oci.yml deleted file mode 100644 index 970d8dd09..000000000 --- a/.github/workflows/oci.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: PHPUnit - -on: - pull_request: - push: - branches: - - master - - stable* - -env: - APP_NAME: logreader - -jobs: - oci: - runs-on: ubuntu-latest - - strategy: - # do not stop on another job's failure - fail-fast: false - matrix: - php-versions: ['7.4'] - databases: ['oci'] - server-versions: ['master'] - - name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }} - - services: - oracle: - image: deepdiver/docker-oracle-xe-11g # "wnameless/oracle-xe-11g-r2" - ports: - - "1521:1521" - - steps: - - name: Checkout server - uses: actions/checkout@v2 - with: - repository: nextcloud/server - ref: ${{ matrix.server-versions }} - - - name: Checkout submodules - shell: bash - run: | - auth_header="$(git config --local --get http.https://github.com/.extraheader)" - git submodule sync --recursive - git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - - - name: Checkout app - uses: actions/checkout@v2 - with: - path: apps/${{ env.APP_NAME }} - - - name: Set up PHPUnit - working-directory: apps/${{ env.APP_NAME }} - run: composer i - - - name: Set up php ${{ matrix.php-versions }} - uses: "shivammathur/setup-php@v2" - with: - php-version: "${{ matrix.php-versions }}" - extensions: mbstring, iconv, fileinfo, intl, oci8 - tools: phpunit:8.5.2 - coverage: none - - - name: Set up Nextcloud - run: | - 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 - ./occ app:enable --force ${{ env.APP_NAME }} - - - name: PHPUnit - working-directory: apps/${{ env.APP_NAME }}/tests - run: phpunit -c phpunit.xml diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index a12cbb30e..1fc839c18 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -191,3 +191,65 @@ jobs: - name: PHPUnit working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml + + oci: + runs-on: ubuntu-latest + + strategy: + # do not stop on another job's failure + fail-fast: false + matrix: + php-versions: ['7.4'] + databases: ['oci'] + server-versions: ['master'] + + name: php${{ matrix.php-versions }}-${{ matrix.databases }}-${{ matrix.server-versions }} + + services: + oracle: + image: deepdiver/docker-oracle-xe-11g # "wnameless/oracle-xe-11g-r2" + ports: + - "1521:1521" + + steps: + - name: Checkout server + uses: actions/checkout@v2 + with: + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 + - name: Checkout app + uses: actions/checkout@v2 + with: + path: apps/${{ env.APP_NAME }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: phpunit + extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql, 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=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 + ./occ app:enable --force files_external + ./occ app:enable --force ${{ env.APP_NAME }} + php -S localhost:8080 & + - name: PHPUnit + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml diff --git a/composer.lock b/composer.lock index 8f893734b..9e8c98095 100644 --- a/composer.lock +++ b/composer.lock @@ -13,12 +13,12 @@ "source": { "type": "git", "url": "https://github.com/ChristophWurst/nextcloud_composer.git", - "reference": "245bf545b36a4519f96e33bed3e1e9a2673216de" + "reference": "3aca7baf34a63c9566ed8161c1f720d3d3ae8a74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/245bf545b36a4519f96e33bed3e1e9a2673216de", - "reference": "245bf545b36a4519f96e33bed3e1e9a2673216de", + "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/3aca7baf34a63c9566ed8161c1f720d3d3ae8a74", + "reference": "3aca7baf34a63c9566ed8161c1f720d3d3ae8a74", "shasum": "" }, "require": { @@ -31,7 +31,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "22.0.0-dev" + "dev-master": "24.0.0-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -49,7 +49,7 @@ "issues": "https://github.com/ChristophWurst/nextcloud_composer/issues", "source": "https://github.com/ChristophWurst/nextcloud_composer/tree/master" }, - "time": "2021-03-05T23:26:19+00:00" + "time": "2022-01-28T01:10:59+00:00" }, { "name": "composer/semver", @@ -3919,5 +3919,5 @@ "prefer-lowest": false, "platform": [], "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.1.0" } From 0fd0637500c872ccf14ecc07c79ea6e0ae05bcda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 10 Feb 2022 15:53:55 +0100 Subject: [PATCH 3/5] Fix PHP extensions for oci tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 1fc839c18..5a999b2c7 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -234,7 +234,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} tools: phpunit - extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql, zip, gd + extensions: mbstring, iconv, fileinfo, intl, zip, gd, oci8 coverage: none - name: Set up PHPUnit From ce2267f25bdbb2529ce2eba18079f043883c807e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 10 Feb 2022 16:05:20 +0100 Subject: [PATCH 4/5] Do not run phpunit twice on PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/phpunit.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 5a999b2c7..e92250e3e 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -1,5 +1,11 @@ name: PHPUnit -on: [push, pull_request] + +on: + pull_request: + push: + branches: + - master + - stable* env: APP_NAME: logreader From 14577caa8632a45767ab6876868a19e3608b8877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 10 Feb 2022 16:07:10 +0100 Subject: [PATCH 5/5] Do not run CI steps twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .github/workflows/lint.yml | 8 +++++++- .github/workflows/static-analysis.yml | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a8233efbd..a28a36a1d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,11 @@ name: Php Lint -on: [push, pull_request] + +on: + pull_request: + push: + branches: + - master + - stable* jobs: php-linters: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 93c045bd3..cc1e68994 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -1,5 +1,11 @@ name: Php Static analysis -on: [push, pull_request] + +on: + pull_request: + push: + branches: + - master + - stable* jobs: static-psalm-analysis: