Skip to content

Cypress snapshot update #170

Cypress snapshot update

Cypress snapshot update #170

# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Cypress snapshot update
on:
workflow_dispatch:
schedule:
# At 2:30 on Sundays
- cron: '20 1 * * 0'
permissions:
contents: read
issues: write
jobs:
update:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branches: ["master", "stable31", "stable32"]
name: cypress-snapshot-update-${{ matrix.branches }}
steps:
- name: Checkout app
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
ref: ${{ matrix.branches }}
- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
with:
fallbackNode: "^20"
fallbackNpm: "^10"
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
- name: Install node dependencies & build app
run: |
npm ci
npm run build --if-present
- name: Snapshot update
run: npm run cypress:update-snapshots
- name: Create Pull Request
if: always()
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: "chore(deps): cypress snapshot update"
committer: GitHub <noreply@github.com>
author: nextcloud-command <nextcloud-command@users.noreply.github.com>
signoff: true
branch: automated/noid/${{ matrix.branches }}-cypress-snapshot-update
title: "[${{ matrix.branches }}] Update cypress snapshots"
body: |
Auto-generated update of cypress snapshots
labels: |
dependencies
3. to review
add-paths: |
cypress/snapshots