-
Notifications
You must be signed in to change notification settings - Fork 8
59 lines (48 loc) · 1.93 KB
/
frontend_playwright.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
name: Frontend Playwright
on:
push:
branches:
- dev/fe
jobs:
test:
timeout-minutes: 60
runs-on:
- self-hosted
- spring
- develop
env:
frontend-directory: ./frontend
steps:
- uses: actions/checkout@v4
- name: 노드 환경 사용
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: 환경 파일 생성
run: |
if [ "${{ github.ref_name }}" == "main" ]; then
echo "REACT_APP_API_URL=${{ secrets.REACT_APP_API_URL }}" > ${{ env.frontend-directory }}/.env.production
echo "REACT_APP_BASE_URL=${{ secrets.REACT_APP_BASE_URL }}" >> ${{ env.frontend-directory }}/.env.production
else
echo "REACT_APP_API_URL=${{ secrets.REACT_APP_BETA_API_URL }}" > ${{ env.frontend-directory }}/.env.development
echo "REACT_APP_BASE_URL=${{ secrets.REACT_APP_BETA_BASE_URL }}" >> ${{ env.frontend-directory }}/.env.development
fi
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> ${{ env.frontend-directory }}/.env.production
echo "SENTRY_DSN=${{ secrets.SENTRY_DSN }}" >> ${{ env.frontend-directory }}/.env.production
echo "SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}" >> ${{ env.frontend-directory }}/.env.sentry-build-plugin
- name: 환경 파일 권한 설정
run: chmod 644 ${{ env.frontend-directory }}/.env.*
- name: npm 패키지 설치
run: npm ci
working-directory: ${{ env.frontend-directory }}
- name: Playwright Browsers 설치
run: npx playwright install --with-deps
working-directory: ${{ env.frontend-directory }}
- name: Playwright 테스트 실행
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30