From e201e268400e8575dc3796879de31f104da639dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Thu, 28 Dec 2023 09:54:47 +0100 Subject: [PATCH] Revert "chore: update workflows from templates" --- .github/workflows/block-merge-freeze.yml | 8 +- .github/workflows/command-compile.yml | 19 ++--- .../workflows/dependabot-approve-merge.yml | 2 +- .github/workflows/lint-eslint.yml | 67 ++++----------- .github/workflows/lint-php-cs.yml | 8 +- .github/workflows/lint-php.yml | 14 ++- .github/workflows/lint-stylelint.yml | 6 +- .github/workflows/node.yml | 85 ++++++------------- .github/workflows/npm-audit-fix.yml | 10 +-- .github/workflows/phpunit-mysql.yml | 68 ++++++--------- .github/workflows/phpunit-oci.yml | 61 ++++++------- .github/workflows/phpunit-pgsql.yml | 61 ++++++------- .github/workflows/phpunit-sqlite.yml | 61 ++++++------- .github/workflows/pr-feedback.yml | 11 +-- .github/workflows/psalm.yml | 18 ++-- 15 files changed, 199 insertions(+), 300 deletions(-) diff --git a/.github/workflows/block-merge-freeze.yml b/.github/workflows/block-merge-freeze.yml index f2d029c9927..221390bd81e 100644 --- a/.github/workflows/block-merge-freeze.yml +++ b/.github/workflows/block-merge-freeze.yml @@ -25,8 +25,12 @@ jobs: runs-on: ubuntu-latest steps: - - name: Download version.php from ${{ github.base_ref }} - run: curl https://raw.githubusercontent.com/nextcloud/server/${{ github.base_ref }}/version.php --output version.php + - name: Register text Git reference + run: | + server_ref="$(if [ "${{ github.base_ref }}" = "main" ]; then echo -n "master"; else echo -n "${{ github.base_ref }}"; fi)" + echo "server_ref=$server_ref" >> $GITHUB_ENV + - name: Download version.php from ${{ env.server_ref }} + run: curl https://raw.githubusercontent.com/nextcloud/server/${{ env.server_ref }}/version.php --output version.php - name: Run check run: cat version.php | grep 'OC_VersionString' | grep -i -v 'RC' diff --git a/.github/workflows/command-compile.yml b/.github/workflows/command-compile.yml index 69c0117bb6f..5f571bed751 100644 --- a/.github/workflows/command-compile.yml +++ b/.github/workflows/command-compile.yml @@ -23,7 +23,7 @@ jobs: require: write - name: Add reaction on start - uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0 + uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3.0.2 with: token: ${{ secrets.COMMAND_BOT_PAT }} repository: ${{ github.event.repository.full_name }} @@ -39,9 +39,9 @@ jobs: id: git-path run: | if ${{ startsWith(steps.command.outputs.arg1, '/') }}; then - echo "path=${{ github.workspace }}${{steps.command.outputs.arg1}}" >> $GITHUB_OUTPUT + echo "path=${{steps.command.outputs.arg1}}" >> $GITHUB_OUTPUT else - echo "path=${{ github.workspace }}${{steps.command.outputs.arg2}}" >> $GITHUB_OUTPUT + echo "path=${{steps.command.outputs.arg2}}" >> $GITHUB_OUTPUT fi - name: Init branch @@ -54,13 +54,13 @@ jobs: steps: - name: Restore cached git repository - uses: buildjet/cache@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 with: path: .git key: git-repo - name: Checkout ${{ needs.init.outputs.head_ref }} - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: token: ${{ secrets.COMMAND_BOT_PAT }} fetch-depth: 0 @@ -79,7 +79,7 @@ jobs: fallbackNpm: '^9' - name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }} - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }} cache: npm @@ -88,9 +88,6 @@ jobs: run: npm i -g npm@"${{ steps.package-engines-versions.outputs.npmVersion }}" - name: Install dependencies & build - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true run: | npm ci npm run build --if-present @@ -98,7 +95,7 @@ jobs: - name: Commit and push default if: ${{ needs.init.outputs.arg1 != 'fixup' && needs.init.outputs.arg1 != 'amend' }} run: | - git add ${{ needs.init.outputs.git_path }} + git add ${{ github.workspace }}${{ needs.init.outputs.git_path }} git commit --signoff -m 'chore(assets): Recompile assets' git push origin ${{ needs.init.outputs.head_ref }} @@ -117,7 +114,7 @@ jobs: git push --force origin ${{ needs.init.outputs.head_ref }} - name: Add reaction on failure - uses: peter-evans/create-or-update-comment@23ff15729ef2fc348714a3bb66d2f655ca9066f2 # v3.1.0 + uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3.0.2 if: failure() with: token: ${{ secrets.COMMAND_BOT_PAT }} diff --git a/.github/workflows/dependabot-approve-merge.yml b/.github/workflows/dependabot-approve-merge.yml index 9951547f76a..e81d209bf76 100644 --- a/.github/workflows/dependabot-approve-merge.yml +++ b/.github/workflows/dependabot-approve-merge.yml @@ -21,7 +21,7 @@ concurrency: jobs: auto-approve-merge: - if: github.actor == 'dependabot[bot]' + if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]' runs-on: ubuntu-latest permissions: # for hmarr/auto-approve-action to approve PRs diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml index 99b624d1a63..d7403d7a925 100644 --- a/.github/workflows/lint-eslint.yml +++ b/.github/workflows/lint-eslint.yml @@ -8,7 +8,20 @@ name: Lint eslint -on: pull_request +on: + pull_request: + paths: + - '.github/workflows/**' + - 'src/**' + - 'appinfo/info.xml' + - 'package.json' + - 'package-lock.json' + - 'tsconfig.json' + - '.eslintrc.*' + - '.eslintignore' + - '**.js' + - '**.ts' + - '**.vue' permissions: contents: read @@ -18,42 +31,14 @@ concurrency: cancel-in-progress: true jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - 'src/**' - - 'appinfo/info.xml' - - 'package.json' - - 'package-lock.json' - - 'tsconfig.json' - - '.eslintrc.*' - - '.eslintignore' - - '**.js' - - '**.ts' - - '**.vue' - lint: runs-on: ubuntu-latest - needs: changes - if: needs.changes.outputs.src != 'false' - - name: NPM lint + name: eslint steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Read package.json node and npm engines version uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 @@ -63,7 +48,7 @@ jobs: fallbackNpm: '^9' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -71,25 +56,7 @@ jobs: run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Install dependencies - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true run: npm ci - name: Lint run: npm run lint - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: [changes, lint] - - if: always() - - # This is the summary, we just avoid to rename it so that branch protection rules still match - name: eslint - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/lint-php-cs.yml b/.github/workflows/lint-php-cs.yml index 163706eaae8..0fdb3ebf5e1 100644 --- a/.github/workflows/lint-php-cs.yml +++ b/.github/workflows/lint-php-cs.yml @@ -22,12 +22,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - name: Set up php8.2 - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + - name: Set up php + uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 with: - php-version: 8.2 + php-version: 8.1 coverage: none ini-file: development env: diff --git a/.github/workflows/lint-php.yml b/.github/workflows/lint-php.yml index dfe72467369..aede1fe09e0 100644 --- a/.github/workflows/lint-php.yml +++ b/.github/workflows/lint-php.yml @@ -5,7 +5,13 @@ name: Lint php -on: pull_request +on: + pull_request: + push: + branches: + - main + - master + - stable* permissions: contents: read @@ -19,16 +25,16 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: [ '8.0', '8.1', '8.2', '8.3' ] + php-versions: [ "8.0", "8.1", "8.2", "8.3" ] name: php-lint steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 with: php-version: ${{ matrix.php-versions }} coverage: none diff --git a/.github/workflows/lint-stylelint.yml b/.github/workflows/lint-stylelint.yml index 684bb6198e5..1062b1c8f3e 100644 --- a/.github/workflows/lint-stylelint.yml +++ b/.github/workflows/lint-stylelint.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Read package.json node and npm engines version uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 @@ -32,7 +32,7 @@ jobs: fallbackNpm: '^9' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -40,8 +40,6 @@ jobs: run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Install dependencies - env: - CYPRESS_INSTALL_BINARY: 0 run: npm ci - name: Lint diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 75c32b44b63..c69f6a3ba21 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -5,7 +5,23 @@ name: Node -on: pull_request +on: + pull_request: + paths: + - '.github/workflows/**' + - 'src/**' + - 'appinfo/info.xml' + - 'package.json' + - 'package-lock.json' + - 'tsconfig.json' + - '**.js' + - '**.ts' + - '**.vue' + push: + branches: + - main + - master + - stable* permissions: contents: read @@ -15,39 +31,13 @@ concurrency: cancel-in-progress: true jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - 'src/**' - - 'appinfo/info.xml' - - 'package.json' - - 'package-lock.json' - - 'tsconfig.json' - - '**.js' - - '**.ts' - - '**.vue' - build: runs-on: ubuntu-latest - needs: changes - if: needs.changes.outputs.src != 'false' - - name: NPM build + name: node steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Read package.json node and npm engines version uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2 @@ -57,7 +47,7 @@ jobs: fallbackNpm: '^9' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -65,35 +55,14 @@ jobs: run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" - name: Install dependencies & build - env: - CYPRESS_INSTALL_BINARY: 0 - PUPPETEER_SKIP_DOWNLOAD: true run: | npm ci npm run build --if-present + npm run stats --if-present - - name: Check webpack build changes - run: | - bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)" - - - name: Show changes on failure - if: failure() - run: | - git status - git --no-pager diff - exit 1 # make it red to grab attention - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: [changes, build] - - if: always() - - # This is the summary, we just avoid to rename it so that branch protection rules still match - name: node - - steps: - - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.build.result != 'success' }}; then exit 1; fi + - name: Send bundle stats to RelativeCI + uses: relative-ci/agent-action@e92b0c712e5ad0a039faf1026cbe438b8e7fed16 # v2 + with: + webpackStatsFile: ./webpack-stats.json + key: ${{ secrets.RELATIVE_CI_KEY }} + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/npm-audit-fix.yml b/.github/workflows/npm-audit-fix.yml index 39ccd584d7c..7a9f1526b4a 100644 --- a/.github/workflows/npm-audit-fix.yml +++ b/.github/workflows/npm-audit-fix.yml @@ -18,13 +18,13 @@ jobs: strategy: fail-fast: false matrix: - branches: ['main', 'master', 'stable28', 'stable27', 'stable26'] + branches: ["main", "stable27", "stable26", "stable25", "stable24"] name: npm-audit-fix-${{ matrix.branches }} steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: ref: ${{ matrix.branches }} @@ -36,7 +36,7 @@ jobs: fallbackNpm: '^9' - name: Set up node ${{ steps.versions.outputs.nodeVersion }} - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ steps.versions.outputs.nodeVersion }} @@ -48,15 +48,11 @@ jobs: npm audit fix - name: Run npm ci and npm run build - if: always() - env: - CYPRESS_INSTALL_BINARY: 0 run: | npm ci npm run build --if-present - name: Create Pull Request - if: always() uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5 with: token: ${{ secrets.COMMAND_BOT_PAT }} diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index b7029d512ef..5a281ac80a9 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -3,9 +3,27 @@ # https://github.com/nextcloud/.github # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization -name: PHPUnit MySQL - -on: pull_request +name: PHPUnit mysql + +on: + pull_request: + paths: + - '.github/workflows/**' + - 'appinfo/**' + - 'lib/**' + - 'templates/**' + - 'tests/**' + - 'vendor/**' + - 'vendor-bin/**' + - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + + push: + branches: + - main + - master + - stable* permissions: contents: read @@ -15,47 +33,17 @@ concurrency: cancel-in-progress: true jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - 'appinfo/**' - - 'lib/**' - - 'templates/**' - - 'tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - phpunit-mysql: runs-on: ubuntu-latest - needs: changes - if: needs.changes.outputs.src != 'false' - strategy: matrix: php-versions: ['8.0', '8.1', '8.2', '8.3'] - server-versions: ['master'] - mysql-versions: ['8.1'] - - name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }} + server-versions: ['stable28'] services: mysql: - image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest + image: ghcr.io/nextcloud/continuous-integration-mariadb-10.6:latest ports: - 4444:3306/tcp env: @@ -69,19 +57,19 @@ jobs: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: submodules: true repository: nextcloud/server ref: ${{ matrix.server-versions }} - name: Checkout app - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -163,7 +151,7 @@ jobs: permissions: contents: none runs-on: ubuntu-latest - needs: [changes, phpunit-mysql] + needs: phpunit-mysql if: always() @@ -171,4 +159,4 @@ jobs: steps: - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-mysql.result != 'success' }}; then exit 1; fi + run: if ${{ needs.phpunit-mysql.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml index e1ae2032746..ba3608d12b8 100644 --- a/.github/workflows/phpunit-oci.yml +++ b/.github/workflows/phpunit-oci.yml @@ -5,7 +5,25 @@ name: PHPUnit OCI -on: pull_request +on: + pull_request: + paths: + - '.github/workflows/**' + - 'appinfo/**' + - 'lib/**' + - 'templates/**' + - 'tests/**' + - 'vendor/**' + - 'vendor-bin/**' + - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + + push: + branches: + - main + - master + - stable* permissions: contents: read @@ -15,40 +33,13 @@ concurrency: cancel-in-progress: true jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - 'appinfo/**' - - 'lib/**' - - 'templates/**' - - 'tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - phpunit-oci: runs-on: ubuntu-22.04 - needs: changes - if: needs.changes.outputs.src != 'false' - strategy: matrix: - php-versions: ['8.2'] - server-versions: ['master'] + php-versions: ['8.0'] + server-versions: ['stable28'] services: oracle: @@ -78,19 +69,19 @@ jobs: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: submodules: true repository: nextcloud/server ref: ${{ matrix.server-versions }} - name: Checkout app - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -167,7 +158,7 @@ jobs: permissions: contents: none runs-on: ubuntu-latest - needs: [changes, phpunit-oci] + needs: phpunit-oci if: always() @@ -175,4 +166,4 @@ jobs: steps: - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-oci.result != 'success' }}; then exit 1; fi + run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/phpunit-pgsql.yml b/.github/workflows/phpunit-pgsql.yml index 45a82163eef..379dfd1dcb1 100644 --- a/.github/workflows/phpunit-pgsql.yml +++ b/.github/workflows/phpunit-pgsql.yml @@ -5,7 +5,25 @@ name: PHPUnit pgsql -on: pull_request +on: + pull_request: + paths: + - '.github/workflows/**' + - 'appinfo/**' + - 'lib/**' + - 'templates/**' + - 'tests/**' + - 'vendor/**' + - 'vendor-bin/**' + - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + + push: + branches: + - main + - master + - stable* permissions: contents: read @@ -15,40 +33,13 @@ concurrency: cancel-in-progress: true jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - 'appinfo/**' - - 'lib/**' - - 'templates/**' - - 'tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - phpunit-pgsql: runs-on: ubuntu-latest - needs: changes - if: needs.changes.outputs.src != 'false' - strategy: matrix: - php-versions: ['8.2'] - server-versions: ['master'] + php-versions: ['8.0'] + server-versions: ['stable28'] services: postgres: @@ -68,19 +59,19 @@ jobs: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: submodules: true repository: nextcloud/server ref: ${{ matrix.server-versions }} - name: Checkout app - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -157,7 +148,7 @@ jobs: permissions: contents: none runs-on: ubuntu-latest - needs: [changes, phpunit-pgsql] + needs: phpunit-pgsql if: always() @@ -165,4 +156,4 @@ jobs: steps: - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-pgsql.result != 'success' }}; then exit 1; fi + run: if ${{ needs.phpunit-pgsql.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/phpunit-sqlite.yml b/.github/workflows/phpunit-sqlite.yml index ed1151ab99e..9ce8b09b864 100644 --- a/.github/workflows/phpunit-sqlite.yml +++ b/.github/workflows/phpunit-sqlite.yml @@ -5,7 +5,25 @@ name: PHPUnit sqlite -on: pull_request +on: + pull_request: + paths: + - '.github/workflows/**' + - 'appinfo/**' + - 'lib/**' + - 'templates/**' + - 'tests/**' + - 'vendor/**' + - 'vendor-bin/**' + - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' + + push: + branches: + - main + - master + - stable* permissions: contents: read @@ -15,40 +33,13 @@ concurrency: cancel-in-progress: true jobs: - changes: - runs-on: ubuntu-latest - - outputs: - src: ${{ steps.changes.outputs.src}} - - steps: - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 - id: changes - continue-on-error: true - with: - filters: | - src: - - '.github/workflows/**' - - 'appinfo/**' - - 'lib/**' - - 'templates/**' - - 'tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - phpunit-sqlite: runs-on: ubuntu-latest - needs: changes - if: needs.changes.outputs.src != 'false' - strategy: matrix: - php-versions: ['8.2'] - server-versions: ['master'] + php-versions: ['8.0'] + server-versions: ['stable28'] steps: - name: Set app env @@ -57,19 +48,19 @@ jobs: echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - name: Checkout server - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: submodules: true repository: nextcloud/server ref: ${{ matrix.server-versions }} - name: Checkout app - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 with: path: apps/${{ env.APP_NAME }} - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 with: php-version: ${{ matrix.php-versions }} # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation @@ -146,7 +137,7 @@ jobs: permissions: contents: none runs-on: ubuntu-latest - needs: [changes, phpunit-sqlite] + needs: phpunit-sqlite if: always() @@ -154,4 +145,4 @@ jobs: steps: - name: Summary status - run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi + run: if ${{ needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi diff --git a/.github/workflows/pr-feedback.yml b/.github/workflows/pr-feedback.yml index 0e7359decda..ea40f794336 100644 --- a/.github/workflows/pr-feedback.yml +++ b/.github/workflows/pr-feedback.yml @@ -1,8 +1,3 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization - name: 'Ask for feedback on PRs' on: schedule: @@ -10,7 +5,7 @@ on: jobs: pr-feedback: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: The get-github-handles-from-website action uses: marcelklehr/get-github-handles-from-website-action@a739600f6b91da4957f51db0792697afbb2f143c # v1.0.0 @@ -23,12 +18,12 @@ jobs: Hello there, Thank you so much for taking the time and effort to create a pull request to our Nextcloud project. - We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. + We hope that the reviewing process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR reviewing process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! days-before-feedback: 14 start-date: "2023-07-10" - exempt-authors: "${{ steps.scrape.outputs.users }},nextcloud-command,nextcloud-android-bot,skjnldsv,datenangebot" + exempt-authors: "${{ steps.scrape.outputs.users }}" exempt-bots: true diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 8e7ffd0246b..bc5430b2b60 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -5,7 +5,13 @@ name: Static analysis -on: pull_request +on: + pull_request: + push: + branches: + - master + - main + - stable* concurrency: group: psalm-${{ github.head_ref || github.run_id }} @@ -15,15 +21,15 @@ jobs: static-analysis: runs-on: ubuntu-latest - name: static-psalm-analysis + name: Nextcloud steps: - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - - name: Set up php8.2 - uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2 + - name: Set up php + uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2 with: - php-version: 8.2 + php-version: 8.1 coverage: none ini-file: development env: