-
Notifications
You must be signed in to change notification settings - Fork 85
75 lines (61 loc) · 2.13 KB
/
cypress.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# 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
#
# SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Cypress
on: pull_request
concurrency:
group: cypress-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
APP_NAME: nextcloud-vue
jobs:
cypress:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# run x copies of the current job in parallel
containers: [1, 2]
name: Runner ${{ matrix.containers }}
steps:
- uses: actions/checkout@v4
- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v3
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^9'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v4
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 dependencies
run: |
npm ci
- name: Cypress run
uses: cypress-io/github-action@v6
with:
component: true
install: false # we have already installed all dependencies above
record: true
parallel: true
# cypress dashboard env
tag: ${{ github.event_name }}
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# https://github.com/cypress-io/github-action/issues/124
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }}
# https://github.com/cypress-io/github-action/issues/524
npm_package_name: ${{ env.APP_NAME }}
- name: Upload snapshots
uses: actions/upload-artifact@v4
if: always()
with:
name: snapshots-${{ matrix.containers }}
path: cypress/snapshots