Skip to content

Commit 8bf1764

Browse files
committed
refactor: ci test script add (#183)
1 parent 9c94e8d commit 8bf1764

File tree

4 files changed

+91
-80
lines changed

4 files changed

+91
-80
lines changed

.github/workflows/chromatic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Chromatic Deployment"
1+
name: Chromatic Deployment
22

33
on:
44
pull_request:

.github/workflows/ci-preview.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Preview CI
2+
23
env:
34
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
45
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
@@ -7,6 +8,7 @@ env:
78
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
89
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
910
NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }}
11+
1012
on:
1113
pull_request:
1214
branches:
@@ -40,9 +42,18 @@ jobs:
4042
- name: Install dependencies
4143
run: yarn
4244

43-
- name: Build
45+
- name: Run Build
4446
run: yarn build
4547

48+
- name: Run unit test
49+
run: yarn test
50+
51+
- name: Playwright install
52+
run: yarn playwright install
53+
54+
- name: Run e2e test
55+
run: yarn e2e:ui
56+
4657
deploy-vercel:
4758
runs-on: ubuntu-latest
4859
outputs:
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 }}

playwright.config.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ export default defineConfig({
3232
name: "chromium",
3333
use: { ...devices["Desktop Chrome"] },
3434
},
35-
{
36-
name: "firefox",
37-
use: { ...devices["Desktop Firefox"] },
38-
},
35+
// {
36+
// name: "firefox",
37+
// use: { ...devices["Desktop Firefox"] },
38+
// },
3939

40-
{
41-
name: "webkit",
42-
use: { ...devices["Desktop Safari"] },
43-
},
40+
// {
41+
// name: "webkit",
42+
// use: { ...devices["Desktop Safari"] },
43+
// },
4444
],
4545
});

0 commit comments

Comments
 (0)