diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b2f50fe70..a28a36a1d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,12 +1,18 @@ name: Php Lint -on: [push, pull_request] + +on: + pull_request: + push: + branches: + - master + - stable* jobs: php-linters: 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 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..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 @@ -191,3 +197,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, zip, gd, oci8 + 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/.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: 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" }