Skip to content

Commit 758132d

Browse files
committed
test message
1 parent a32a522 commit 758132d

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/cypress.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Cypress Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
cypress:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'yarn'
25+
26+
- name: Install dependencies
27+
run: yarn install --frozen-lockfile
28+
29+
- name: Get Cypress cache
30+
uses: actions/cache@v3
31+
id: cypress-cache
32+
with:
33+
path: ~/.cache/Cypress
34+
key: cypress-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
35+
restore-keys: |
36+
cypress-${{ runner.os }}-
37+
38+
- name: Install Cypress
39+
if: steps.cypress-cache.outputs.cache-hit != 'true'
40+
run: yarn cypress install
41+
42+
- name: Run Cypress tests
43+
uses: cypress-io/github-action@v6
44+
with:
45+
start: yarn start
46+
wait-on: 'http://localhost:3000'
47+
wait-on-timeout: 120
48+
browser: chrome
49+
record: false
50+
51+
- name: Upload Cypress screenshots
52+
uses: actions/upload-artifact@v3
53+
if: failure()
54+
with:
55+
name: cypress-screenshots
56+
path: cypress/screenshots
57+
if-no-files-found: ignore
58+
59+
- name: Upload Cypress videos
60+
uses: actions/upload-artifact@v3
61+
if: always()
62+
with:
63+
name: cypress-videos
64+
path: cypress/videos
65+
if-no-files-found: ignore

0 commit comments

Comments
 (0)