kopia lustrzana https://github.com/nextcloud/social
				
				
				
			chore: update workflows from templates
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com> Signed-off-by: Louis Chemineau <louis@chmn.me>pull/1771/head
							rodzic
							
								
									b5d0e55d18
								
							
						
					
					
						commit
						c90652d310
					
				|  | @ -32,7 +32,7 @@ jobs: | |||
|           echo "APP_VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV | ||||
| 
 | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
|         with: | ||||
|           path: ${{ env.APP_NAME }} | ||||
| 
 | ||||
|  | @ -44,7 +44,7 @@ jobs: | |||
|           expression: "//info//dependencies//nextcloud/@min-version" | ||||
| 
 | ||||
|       - name: Read package.json node and npm engines version | ||||
|         uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2 | ||||
|         uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 | ||||
|         id: versions | ||||
|         # Continue if no package.json | ||||
|         continue-on-error: true | ||||
|  | @ -56,7 +56,7 @@ jobs: | |||
|       - name: Set up node ${{ steps.versions.outputs.nodeVersion }} | ||||
|         # Skip if no package.json | ||||
|         if: ${{ steps.versions.outputs.nodeVersion }} | ||||
|         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 | ||||
|         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||||
|         with: | ||||
|           node-version: ${{ steps.versions.outputs.nodeVersion }} | ||||
| 
 | ||||
|  | @ -66,7 +66,7 @@ jobs: | |||
|         run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" | ||||
| 
 | ||||
|       - name: Set up php ${{ env.PHP_VERSION }} | ||||
|         uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 | ||||
|         uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||||
|         with: | ||||
|           php-version: ${{ env.PHP_VERSION }} | ||||
|           coverage: none | ||||
|  | @ -126,9 +126,10 @@ jobs: | |||
|           unzip latest-$NCVERSION.zip | ||||
| 
 | ||||
|       - name: Checkout server master fallback | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
|         if: ${{ steps.server-checkout.outcome != 'success' }} | ||||
|         with: | ||||
|           submodules: true | ||||
|           repository: nextcloud/server | ||||
|           path: nextcloud | ||||
| 
 | ||||
|  | @ -148,7 +149,7 @@ jobs: | |||
|           tar -zcvf ${{ env.APP_NAME }}.tar.gz ${{ env.APP_NAME }} | ||||
| 
 | ||||
|       - name: Attach tarball to github release | ||||
|         uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575 # v2 | ||||
|         uses: svenstaro/upload-release-action@2b9d2847a97b04d02ad5c3df2d3a27baa97ce689 # v2 | ||||
|         id: attach_to_release | ||||
|         with: | ||||
|           repo_token: ${{ secrets.GITHUB_TOKEN }} | ||||
|  |  | |||
|  | @ -3,11 +3,11 @@ | |||
| # https://github.com/nextcloud/.github | ||||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||||
| 
 | ||||
| name: Pull request checks | ||||
| name: Block fixup and squash commits | ||||
| 
 | ||||
| on: | ||||
|   pull_request: | ||||
|     types: [opened, ready_for_review, reopened] | ||||
|     types: [opened, ready_for_review, reopened, synchronize] | ||||
| 
 | ||||
| permissions: | ||||
|   contents: read | ||||
|  | @ -28,6 +28,6 @@ jobs: | |||
| 
 | ||||
|     steps: | ||||
|       - name: Run check | ||||
|         uses: xt0rted/block-autosquash-commits-action@79880c36b4811fe549cfffe20233df88876024e7 # v2 | ||||
|         uses: skjnldsv/block-fixup-merge-action@42d26e1b536ce61e5cf467d65fb76caf4aa85acf # v1 | ||||
|         with: | ||||
|           repo-token: ${{ secrets.GITHUB_TOKEN }} | ||||
|  |  | |||
|  | @ -6,7 +6,7 @@ | |||
| # Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions | ||||
| # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks | ||||
| 
 | ||||
| name: Lint | ||||
| name: Lint eslint | ||||
| 
 | ||||
| on: | ||||
|   pull_request: | ||||
|  |  | |||
|  | @ -6,7 +6,7 @@ | |||
| # Use lint-eslint together with lint-eslint-when-unrelated to make eslint a required check for GitHub actions | ||||
| # https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks | ||||
| 
 | ||||
| name: Lint | ||||
| name: Lint eslint | ||||
| 
 | ||||
| on: | ||||
|   pull_request: | ||||
|  | @ -38,17 +38,17 @@ jobs: | |||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
| 
 | ||||
|       - name: Read package.json node and npm engines version | ||||
|         uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2 | ||||
|         uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 | ||||
|         id: versions | ||||
|         with: | ||||
|           fallbackNode: '^16' | ||||
|           fallbackNpm: '^7' | ||||
| 
 | ||||
|       - name: Set up node ${{ steps.versions.outputs.nodeVersion }} | ||||
|         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 | ||||
|         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||||
|         with: | ||||
|           node-version: ${{ steps.versions.outputs.nodeVersion }} | ||||
| 
 | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
| # https://github.com/nextcloud/.github | ||||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||||
| 
 | ||||
| name: Lint | ||||
| name: Lint info.xml | ||||
| 
 | ||||
| on: | ||||
|   pull_request: | ||||
|  | @ -27,13 +27,13 @@ jobs: | |||
|     name: info.xml lint | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
| 
 | ||||
|       - name: Download schema | ||||
|         run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd | ||||
| 
 | ||||
|       - name: Lint info.xml | ||||
|         uses: ChristophWurst/xmllint-action@d18a551aab4728e4af449617638600634d7a48cb # v1 | ||||
|         uses: ChristophWurst/xmllint-action@39155a91429af431d65fafc21fa52ba5c4f5cb71 # v1.1 | ||||
|         with: | ||||
|           xml-file: ./appinfo/info.xml | ||||
|           xml-schema-file: ./info.xsd | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
| # https://github.com/nextcloud/.github | ||||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||||
| 
 | ||||
| name: Lint | ||||
| name: Lint php-cs | ||||
| 
 | ||||
| on: pull_request | ||||
| 
 | ||||
|  | @ -22,13 +22,14 @@ jobs: | |||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
| 
 | ||||
|       - name: Set up php | ||||
|         uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 | ||||
|         uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||||
|         with: | ||||
|           php-version: 8.1 | ||||
|           coverage: none | ||||
|           ini-file: development | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
| 
 | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
| # https://github.com/nextcloud/.github | ||||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||||
| 
 | ||||
| name: Lint | ||||
| name: Lint php | ||||
| 
 | ||||
| on: | ||||
|   pull_request: | ||||
|  | @ -25,19 +25,20 @@ jobs: | |||
|     runs-on: ubuntu-latest | ||||
|     strategy: | ||||
|       matrix: | ||||
|         php-versions: [ "7.4", "8.0", "8.1", "8.2" ] | ||||
|         php-versions: [ "8.0", "8.1", "8.2" ] | ||||
| 
 | ||||
|     name: php-lint | ||||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
| 
 | ||||
|       - name: Set up php ${{ matrix.php-versions }} | ||||
|         uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 | ||||
|         uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||||
|         with: | ||||
|           php-version: ${{ matrix.php-versions }} | ||||
|           coverage: none | ||||
|           ini-file: development | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
| 
 | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
| # https://github.com/nextcloud/.github | ||||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||||
| 
 | ||||
| name: Lint | ||||
| name: Lint stylelint | ||||
| 
 | ||||
| on: pull_request | ||||
| 
 | ||||
|  | @ -22,17 +22,17 @@ jobs: | |||
| 
 | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
| 
 | ||||
|       - name: Read package.json node and npm engines version | ||||
|         uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2 | ||||
|         uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 | ||||
|         id: versions | ||||
|         with: | ||||
|           fallbackNode: '^16' | ||||
|           fallbackNpm: '^7' | ||||
| 
 | ||||
|       - name: Set up node ${{ steps.versions.outputs.nodeVersion }} | ||||
|         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 | ||||
|         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||||
|         with: | ||||
|           node-version: ${{ steps.versions.outputs.nodeVersion }} | ||||
| 
 | ||||
|  |  | |||
|  | @ -37,17 +37,17 @@ jobs: | |||
|     name: node | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
| 
 | ||||
|       - name: Read package.json node and npm engines version | ||||
|         uses: skjnldsv/read-package-engines-version-actions@1bdcee71fa343c46b18dc6aceffb4cd1e35209c6 # v1.2 | ||||
|         uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1 | ||||
|         id: versions | ||||
|         with: | ||||
|           fallbackNode: '^16' | ||||
|           fallbackNpm: '^7' | ||||
| 
 | ||||
|       - name: Set up node ${{ steps.versions.outputs.nodeVersion }} | ||||
|         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3 | ||||
|         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 | ||||
|         with: | ||||
|           node-version: ${{ steps.versions.outputs.nodeVersion }} | ||||
| 
 | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
| # https://github.com/nextcloud/.github | ||||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||||
| 
 | ||||
| name: PHPUnit | ||||
| name: PHPUnit mysql | ||||
| 
 | ||||
| on: | ||||
|   pull_request: | ||||
|  | @ -38,12 +38,12 @@ jobs: | |||
| 
 | ||||
|     strategy: | ||||
|       matrix: | ||||
|         php-versions: ['8.0', '8.1'] | ||||
|         php-versions: ['8.0', '8.1', '8.2'] | ||||
|         server-versions: ['master'] | ||||
| 
 | ||||
|     services: | ||||
|       mysql: | ||||
|         image: mariadb:10.5 | ||||
|         image: ghcr.io/nextcloud/continuous-integration-mariadb-10.6:latest | ||||
|         ports: | ||||
|           - 4444:3306/tcp | ||||
|         env: | ||||
|  | @ -62,23 +62,25 @@ jobs: | |||
|           echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword | ||||
| 
 | ||||
|       - name: Checkout server | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
|         with: | ||||
|           submodules: true | ||||
|           repository: nextcloud/server | ||||
|           ref: ${{ matrix.server-versions }} | ||||
| 
 | ||||
|       - name: Checkout app | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
|         with: | ||||
|           path: apps/${{ env.APP_NAME }} | ||||
| 
 | ||||
|       - name: Set up php ${{ matrix.php-versions }} | ||||
|         uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 | ||||
|         uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||||
|         with: | ||||
|           php-version: ${{ matrix.php-versions }} | ||||
|           extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql | ||||
|           # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation | ||||
|           extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql | ||||
|           coverage: none | ||||
|           ini-file: development | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
| 
 | ||||
|  | @ -99,7 +101,7 @@ jobs: | |||
|           DB_PORT: 4444 | ||||
|         run: | | ||||
|           mkdir data | ||||
|           ./occ maintenance:install --verbose --database=mysql --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 | ||||
|           ./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin | ||||
|           ./occ app:enable --force ${{ env.APP_NAME }} | ||||
| 
 | ||||
|       - name: Check PHPUnit script is defined | ||||
|  | @ -133,6 +135,11 @@ jobs: | |||
|         working-directory: apps/${{ env.APP_NAME }} | ||||
|         run: composer run test:integration | ||||
| 
 | ||||
|       - name: Print logs | ||||
|         if: always() | ||||
|         run: | | ||||
|           cat data/nextcloud.log | ||||
| 
 | ||||
|       - name: Skipped | ||||
|         # Fail the action when neither unit nor integration tests ran | ||||
|         if: steps.check_phpunit.outcome == 'failure' && steps.check_integration.outcome == 'failure' | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
| # https://github.com/nextcloud/.github | ||||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||||
| 
 | ||||
| name: PHPUnit | ||||
| name: PHPUnit pgsql | ||||
| 
 | ||||
| on: | ||||
|   pull_request: | ||||
|  | @ -43,7 +43,7 @@ jobs: | |||
| 
 | ||||
|     services: | ||||
|       postgres: | ||||
|         image: postgres:14 | ||||
|         image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest | ||||
|         ports: | ||||
|           - 4444:5432/tcp | ||||
|         env: | ||||
|  | @ -59,23 +59,25 @@ jobs: | |||
|           echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | ||||
| 
 | ||||
|       - name: Checkout server | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
|         with: | ||||
|           submodules: true | ||||
|           repository: nextcloud/server | ||||
|           ref: ${{ matrix.server-versions }} | ||||
| 
 | ||||
|       - name: Checkout app | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
|         with: | ||||
|           path: apps/${{ env.APP_NAME }} | ||||
| 
 | ||||
|       - name: Set up php ${{ matrix.php-versions }} | ||||
|         uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 | ||||
|         uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||||
|         with: | ||||
|           php-version: ${{ matrix.php-versions }} | ||||
|           extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql | ||||
|           # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation | ||||
|           extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql | ||||
|           coverage: none | ||||
|           ini-file: development | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
| 
 | ||||
|  | @ -96,7 +98,7 @@ jobs: | |||
|           DB_PORT: 4444 | ||||
|         run: | | ||||
|           mkdir data | ||||
|           ./occ maintenance:install --verbose --database=pgsql --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 | ||||
|           ./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin | ||||
|           ./occ app:enable --force ${{ env.APP_NAME }} | ||||
| 
 | ||||
|       - name: Check PHPUnit script is defined | ||||
|  | @ -130,6 +132,11 @@ jobs: | |||
|         working-directory: apps/${{ env.APP_NAME }} | ||||
|         run: composer run test:integration | ||||
| 
 | ||||
|       - name: Print logs | ||||
|         if: always() | ||||
|         run: | | ||||
|           cat data/nextcloud.log | ||||
| 
 | ||||
|       - name: Skipped | ||||
|         # Fail the action when neither unit nor integration tests ran | ||||
|         if: steps.check_phpunit.outcome == 'failure' && steps.check_integration.outcome == 'failure' | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
| # https://github.com/nextcloud/.github | ||||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||||
| 
 | ||||
| name: PHPUnit | ||||
| name: PHPUnit sqlite | ||||
| 
 | ||||
| on: | ||||
|   pull_request: | ||||
|  | @ -48,23 +48,25 @@ jobs: | |||
|           echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV | ||||
| 
 | ||||
|       - name: Checkout server | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
|         with: | ||||
|           submodules: true | ||||
|           repository: nextcloud/server | ||||
|           ref: ${{ matrix.server-versions }} | ||||
| 
 | ||||
|       - name: Checkout app | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
|         with: | ||||
|           path: apps/${{ env.APP_NAME }} | ||||
| 
 | ||||
|       - name: Set up php ${{ matrix.php-versions }} | ||||
|         uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 | ||||
|         uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||||
|         with: | ||||
|           php-version: ${{ matrix.php-versions }} | ||||
|           extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite | ||||
|           # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation | ||||
|           extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite | ||||
|           coverage: none | ||||
|           ini-file: development | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
| 
 | ||||
|  | @ -85,7 +87,7 @@ jobs: | |||
|           DB_PORT: 4444 | ||||
|         run: | | ||||
|           mkdir data | ||||
|           ./occ maintenance:install --verbose --database=sqlite --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 | ||||
|           ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin | ||||
|           ./occ app:enable --force ${{ env.APP_NAME }} | ||||
| 
 | ||||
|       - name: Check PHPUnit script is defined | ||||
|  | @ -119,6 +121,11 @@ jobs: | |||
|         working-directory: apps/${{ env.APP_NAME }} | ||||
|         run: composer run test:integration | ||||
| 
 | ||||
|       - name: Print logs | ||||
|         if: always() | ||||
|         run: | | ||||
|           cat data/nextcloud.log | ||||
| 
 | ||||
|       - name: Skipped | ||||
|         # Fail the action when neither unit nor integration tests ran | ||||
|         if: steps.check_phpunit.outcome == 'failure' && steps.check_integration.outcome == 'failure' | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ | |||
| # https://github.com/nextcloud/.github | ||||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||||
| 
 | ||||
| name: PHPUnit | ||||
| name: PHPUnit summary | ||||
| 
 | ||||
| on: | ||||
|   pull_request: | ||||
|  |  | |||
|  | @ -24,18 +24,19 @@ jobs: | |||
|       # do not stop on another job's failure | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         ocp-version: [ 'dev-master', 'dev-stable27' ] | ||||
|         ocp-version: [ 'dev-master', 'dev-stable27', 'dev-stable26', 'dev-stable25'] | ||||
| 
 | ||||
|     name: Nextcloud ${{ matrix.ocp-version }} | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 | ||||
|         uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 | ||||
| 
 | ||||
|       - name: Set up php | ||||
|         uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2 | ||||
|         uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 | ||||
|         with: | ||||
|           php-version: 8.0 | ||||
|           coverage: none | ||||
|           ini-file: development | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
| 
 | ||||
|  | @ -43,7 +44,7 @@ jobs: | |||
|         run: composer i | ||||
| 
 | ||||
|       - name: Install dependencies | ||||
|         run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} --ignore-platform-reqs | ||||
|         run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} --ignore-platform-reqs --with-dependencies | ||||
| 
 | ||||
|       - name: Run coding standards check | ||||
|         run: composer run psalm | ||||
|  |  | |||
		Ładowanie…
	
		Reference in New Issue
	
	 John Molakvoæ
						John Molakvoæ