Skip to content

Commit

Permalink
👷 Add E2E CI
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeSeoKim committed Jan 18, 2024
1 parent f246a42 commit b00f115
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ on:
- main
paths:
- "docs/**"
workflow_run:
workflows: [E2E]
types: [completed]

env:
CI: true

jobs:
docs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- name: Install Node.js
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: E2E
on:
pull_request:
branches: [main]

jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
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
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Make Playwright tests snapshot
working-directory: packages/react-kakao-maps-sdk
run: |
pnpm run test -u
- name: Run Playwright tests
working-directory: packages/react-kakao-maps-sdk
run: |
pnpm run test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: packages/react-kakao-maps-sdk/playwright-report/
retention-days: 30
4 changes: 4 additions & 0 deletions .github/workflows/npm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ name: npm-publish
on:
release:
types: [published]
workflow_run:
workflows: [E2E]
types: [completed]

env:
CI: true

jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- name: Install Node.js
Expand Down

0 comments on commit b00f115

Please sign in to comment.