Skip to content

Commit

Permalink
Merge pull request #1477 from nextcloud/automated/update-workflows/st…
Browse files Browse the repository at this point in the history
…able28

chore: update workflows from templates
  • Loading branch information
artonge authored Jan 2, 2024
2 parents 6c7dc1c + fb255cf commit c537dcf
Showing 13 changed files with 34 additions and 40 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Cypress

on:
pull_request:
push:
branches:
- main
- master
- stable*
on: pull_request

concurrency:
group: cypress-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
# Adjust APP_NAME if your repository name is different
@@ -25,9 +23,12 @@ jobs:
nodeVersion: ${{ steps.versions.outputs.nodeVersion }}
npmVersion: ${{ steps.versions.outputs.npmVersion }}

env:
PUPPETEER_SKIP_DOWNLOAD: true

steps:
- name: Checkout app
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Check composer.json
id: check_composer
@@ -40,14 +41,14 @@ jobs:
run: composer install --no-dev

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@0ce2ed60f6df073a62a77c0a4958dd0fc68e32e7 # v2.1
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
id: versions
with:
fallbackNode: "^20"
fallbackNpm: "^9"

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}

@@ -87,15 +88,15 @@ jobs:
path: ./

- name: Set up node ${{ needs.init.outputs.nodeVersion }}
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: ${{ needs.init.outputs.nodeVersion }}

- name: Set up npm ${{ needs.init.outputs.npmVersion }}
run: npm i -g npm@"${{ needs.init.outputs.npmVersion }}"

- name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests
uses: cypress-io/github-action@db1693016f23ccf9043f4b2428f9b04e5d502a73 # v5.8.1
uses: cypress-io/github-action@ebe8b24c4428922d0f793a5c4c96853a633180e3 # v6.6.0
with:
record: true
parallel: true
@@ -116,7 +117,7 @@ jobs:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}

- name: Upload snapshots
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
if: always()
with:
name: snapshots_${{ matrix.containers }}
@@ -127,7 +128,7 @@ jobs:
run: docker logs nextcloud-cypress-tests-${{ env.APP_NAME }} > nextcloud.log

- name: Upload NC logs
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
if: failure() && matrix.containers != 'component'
with:
name: nc_logs_${{ matrix.containers }}
2 changes: 1 addition & 1 deletion .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up php8.2
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: 8.2
coverage: none
2 changes: 1 addition & 1 deletion .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
2 changes: 1 addition & 1 deletion .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ jobs:

- name: Test and process coverage
run: npm run test:coverage --if-present

- name: Collect coverage
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
7 changes: 0 additions & 7 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -83,13 +83,6 @@ jobs:
git --no-pager diff
exit 1 # make it red to grab attention
- name: Upload assets for debugging
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: failure()
with:
name: assets
path: js/

summary:
permissions:
contents: none
2 changes: 1 addition & 1 deletion .github/workflows/npm-audit-fix.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
branches: ['main', 'master', 'stable28', 'stable27', 'stable26']

name: npm-audit-fix-${{ matrix.branches }}

steps:
4 changes: 2 additions & 2 deletions .github/workflows/phpunit-mariadb.yml
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ jobs:
matrix:
php-versions: ['8.2']
mariadb-versions: ['10.6', '10.11']
server-versions: ['stable28']
server-versions: ['master']

name: MariaDB ${{ matrix.mariadb-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}

@@ -81,7 +81,7 @@ jobs:
path: apps/${{ env.APP_NAME }}

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
4 changes: 2 additions & 2 deletions .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2', '8.3']
server-versions: ['stable28']
server-versions: ['master']
mysql-versions: ['8.1']

name: MySQL ${{ matrix.mysql-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
@@ -81,7 +81,7 @@ jobs:
path: apps/${{ env.APP_NAME }}

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
4 changes: 2 additions & 2 deletions .github/workflows/phpunit-oci.yml
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.2']
server-versions: ['stable28']
server-versions: ['master']

services:
oracle:
@@ -90,7 +90,7 @@ jobs:
path: apps/${{ env.APP_NAME }}

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
4 changes: 2 additions & 2 deletions .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.2']
server-versions: ['stable28']
server-versions: ['master']

services:
postgres:
@@ -80,7 +80,7 @@ jobs:
path: apps/${{ env.APP_NAME }}

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
4 changes: 2 additions & 2 deletions .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.2']
server-versions: ['stable28']
server-versions: ['master']

steps:
- name: Set app env
@@ -69,7 +69,7 @@ jobs:
path: apps/${{ env.APP_NAME }}

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
6 changes: 3 additions & 3 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
@@ -15,13 +15,13 @@ jobs:
static-analysis:
runs-on: ubuntu-latest

name: Nextcloud
name: static-psalm-analysis
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up php
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
- name: Set up php8.2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: 8.2
coverage: none
4 changes: 2 additions & 2 deletions .github/workflows/update-nextcloud-ocp.yml
Original file line number Diff line number Diff line change
@@ -29,9 +29,9 @@ jobs:
submodules: true
continue-on-error: true

- name: Set up php
- name: Set up php8.2
if: steps.checkout.outcome == 'success'
uses: shivammathur/setup-php@81cd5ae0920b34eef300e1775313071038a53429 # v2
uses: shivammathur/setup-php@e6f75134d35752277f093989e72e140eaa222f35 # v2
with:
php-version: 8.2
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

0 comments on commit c537dcf

Please sign in to comment.