Skip to content

Commit

Permalink
💚 Fix CI setup
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeSeoKim committed Jan 18, 2024
1 parent b00f115 commit b9f681d
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 20 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
name: docs
on:
release:
types: [published]
workflow_dispatch:
inputs:
work:
description: 작업 트리거
required: false
push:
branches:
- main
paths:
- "docs/**"
workflow_run:
workflows: [E2E]
workflows: [pre-docs-e2e]
types: [completed]

env:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/npm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@ 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
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: E2E
name: pr-e2e
on:
pull_request:
branches: [main]

env:
CI: true
KAKAOMAP_API_KEY: ${{ secrets.KAKAOMAP_API_KEY }}
VITE_KAKAOMAP_API_KEY: ${{ secrets.KAKAOMAP_API_KEY }}

jobs:
test:
timeout-minutes: 60
Expand Down Expand Up @@ -42,6 +47,6 @@ jobs:
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
name: pr-playwright-report
path: packages/react-kakao-maps-sdk/playwright-report/
retention-days: 30
retention-days: 15
60 changes: 60 additions & 0 deletions .github/workflows/pre-docs-e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: pre-docs-e2e
on:
workflow_dispatch:
inputs:
work:
description: 작업 트리거
required: false
push:
branches:
- main
paths:
- "docs/**"

env:
CI: true
KAKAOMAP_API_KEY: ${{ secrets.KAKAOMAP_API_KEY }}
VITE_KAKAOMAP_API_KEY: ${{ secrets.KAKAOMAP_API_KEY }}

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: 7

0 comments on commit b9f681d

Please sign in to comment.