Skip to content

Commit bb50388

Browse files
committed
refactor: e2e test script add (#183)
1 parent 9c94e8d commit bb50388

File tree

2 files changed

+94
-72
lines changed

2 files changed

+94
-72
lines changed

.github/workflows/ci-preview.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
- name: Install dependencies
4141
run: yarn
4242

43-
- name: Build
44-
run: yarn build
43+
# - name: Build
44+
# run: yarn build
4545

4646
deploy-vercel:
4747
runs-on: ubuntu-latest
@@ -93,6 +93,28 @@ jobs:
9393
format: "YYYY년 MM월 DD일 HH시 mm분"
9494
utcOffset: "+09:00"
9595

96+
e2e-test:
97+
runs-on: ubuntu-latest
98+
needs: [deploy-vercel]
99+
timeout-minutes: 60
100+
steps:
101+
- uses: actions/checkout@v4
102+
- uses: actions/setup-node@v4
103+
with:
104+
node-version: 18
105+
cache: "yarn"
106+
107+
- name: Install dependencies
108+
run: yarn
109+
110+
- name: Install playwright
111+
run: yarn playwright install --with-deps
112+
113+
- name: Run playwright tests
114+
run: yarn e2e:ui
115+
env:
116+
BASE_URL: ${{ steps.vercel_preview_url.outputs.preview_url }}
117+
96118
github-deploy-comment:
97119
runs-on: ubuntu-latest
98120
needs: [deploy-vercel]
Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,82 @@
1-
name: Production CI
2-
env:
3-
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
4-
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
5-
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
6-
NEXT_PUBLIC_API_BASE_URL: ${{ secrets.NEXT_PUBLIC_API_BASE_URL }}
7-
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
8-
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
9-
NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
10-
on:
11-
push:
12-
branches:
13-
- develop
14-
pull_request:
15-
branches:
16-
- develop
1+
# name: Production CI
2+
# env:
3+
# VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
4+
# VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
5+
# VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
6+
# NEXT_PUBLIC_API_BASE_URL: ${{ secrets.NEXT_PUBLIC_API_BASE_URL }}
7+
# NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
8+
# NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
9+
# NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
10+
# on:
11+
# push:
12+
# branches:
13+
# - develop
14+
# pull_request:
15+
# branches:
16+
# - develop
1717

18-
jobs:
19-
build:
20-
runs-on: ubuntu-latest
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v4
18+
# jobs:
19+
# build:
20+
# runs-on: ubuntu-latest
21+
# steps:
22+
# - name: Checkout
23+
# uses: actions/checkout@v4
2424

25-
- name: Setup Node.js environment
26-
uses: actions/setup-node@v4
27-
with:
28-
node-version: 18
29-
cache: "yarn"
25+
# - name: Setup Node.js environment
26+
# uses: actions/setup-node@v4
27+
# with:
28+
# node-version: 18
29+
# cache: "yarn"
3030

31-
- name: Get yarn cache directory path
32-
id: yarn-cache-dir-path
33-
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
31+
# - name: Get yarn cache directory path
32+
# id: yarn-cache-dir-path
33+
# run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
3434

35-
- uses: actions/cache@v4
36-
id: yarn-cache
37-
with:
38-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
39-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
40-
restore-keys: |
41-
${{ runner.os }}-yarn-
35+
# - uses: actions/cache@v4
36+
# id: yarn-cache
37+
# with:
38+
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
39+
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
40+
# restore-keys: |
41+
# ${{ runner.os }}-yarn-
4242

43-
- name: Install dependencies
44-
run: yarn
43+
# - name: Install dependencies
44+
# run: yarn
4545

46-
- name: Build
47-
run: yarn build
46+
# - name: Build
47+
# run: yarn build
4848

49-
deploy-vercel:
50-
runs-on: ubuntu-latest
51-
needs: build
52-
steps:
53-
- name: Checkout
54-
uses: actions/checkout@v4
49+
# deploy-vercel:
50+
# runs-on: ubuntu-latest
51+
# needs: build
52+
# steps:
53+
# - name: Checkout
54+
# uses: actions/checkout@v4
5555

56-
- name: Setup Node.js environment
57-
uses: actions/setup-node@v4
58-
with:
59-
node-version: 18
60-
cache: "yarn"
56+
# - name: Setup Node.js environment
57+
# uses: actions/setup-node@v4
58+
# with:
59+
# node-version: 18
60+
# cache: "yarn"
6161

62-
- name: Get yarn cache directory path
63-
id: yarn-cache-dir-path
64-
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
62+
# - name: Get yarn cache directory path
63+
# id: yarn-cache-dir-path
64+
# run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
6565

66-
- uses: actions/cache@v4
67-
id: yarn-cache
68-
with:
69-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
70-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
71-
restore-keys: |
72-
${{ runner.os }}-yarn-
66+
# - uses: actions/cache@v4
67+
# id: yarn-cache
68+
# with:
69+
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
70+
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
71+
# restore-keys: |
72+
# ${{ runner.os }}-yarn-
7373

74-
- name: Install dependencies
75-
run: yarn
74+
# - name: Install dependencies
75+
# run: yarn
7676

77-
- name: Deploy to Vercel if needed
78-
run: |
79-
npm install --global vercel@latest
80-
vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
81-
vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
82-
vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
77+
# - name: Deploy to Vercel if needed
78+
# run: |
79+
# npm install --global vercel@latest
80+
# vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
81+
# vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
82+
# vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

0 commit comments

Comments
 (0)