-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
55 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |