Cypress snapshot update #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cypress snapshot update | |
on: | |
workflow_dispatch: | |
schedule: | |
# At 2:30 on Sundays | |
- cron: '20 1 * * 0' | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
branches: ["master", "stable30", "stable29", "stable28"] | |
name: cypress-snapshot-update-${{ matrix.branches }} | |
steps: | |
- name: Checkout app | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
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@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
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@c5a7806660adbe173f04e3e038b0ccdcd758773c # v5 | |
with: | |
token: ${{ secrets.COMMAND_BOT_PAT }} | |
commit-message: "chore(deps): cypress snapshot update" | |
committer: GitHub <[email protected]> | |
author: nextcloud-command <[email protected]> | |
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 |