Skip to content

Commit

Permalink
ci: 개발 서버를 사용해 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 committed Aug 23, 2023
1 parent c78dad4 commit 5a98b89
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 55 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/build.yml

This file was deleted.

73 changes: 53 additions & 20 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,60 @@
name: Playwright Tests
name: 테스트
on:
push:
branches: [ main, master ]
branches: [develop]
pull_request:
branches: [ main, master ]
workflow_dispatch:

jobs:
test:
e2e:
environment: test
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-

- name: install dependencies
run: |
pnpm install --frozen-lockfile
- name: Build app
run: pnpm run build

- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps

- name: Run Playwright tests
run: pnpm exec playwright test
env:
REACT_APP_API: ${{ secrets.REACT_APP_API }}
PORT: ${{ vars.PORT }}
REACT_APP_WISH: ${{ vars.REACT_APP_WISH }}
REACT_APP_SUGGESTION: ${{ vars.REACT_APP_SUGGESTION }}
REACT_APP_E_BOOK_LIBRARY: ${{ vars.REACT_APP_E_BOOK_LIBRARY }}

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

0 comments on commit 5a98b89

Please sign in to comment.