-
Notifications
You must be signed in to change notification settings - Fork 4
77 lines (65 loc) · 1.96 KB
/
Copy pathe2e.yml
File metadata and controls
77 lines (65 loc) · 1.96 KB
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
76
77
name: E2E Tests
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'yarn'
- name: Set Yarn version
run: corepack prepare yarn@4.10.3 --activate
- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache Cypress binary
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-cypress-
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run E2E tests
uses: cypress-io/github-action@v6
with:
install: false
start: yarn dev --port 5173
wait-on: 'http://localhost:5173'
wait-on-timeout: 120
browser: chrome
headed: false
env:
VITE_API_BASE_URL: ${{ secrets.VITE_API_BASE_URL }}
VITE_KAKAO_JS_KEY: ${{ secrets.VITE_KAKAO_JS_KEY }}
VITE_KAKAO_REST_KEY: ${{ secrets.VITE_KAKAO_REST_KEY }}
VITE_KAKAO_REDIRECT_URI: ${{ secrets.VITE_KAKAO_REDIRECT_URI }}
- name: Upload screenshots on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
retention-days: 7
if-no-files-found: ignore