Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update workflows from templates #1476

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Expand All @@ -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
Expand All @@ -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 }}

Expand Down Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-php-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-audit-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
branches: ['main', 'master', 'stable28', 'stable27', 'stable26']

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

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-nextcloud-ocp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading