Code N Solve ๐: Playwright์ Gatsby CI/CD ๊ณผ์ ์์ ๋ฐ์ํ browserType.launch ์ค๋ฅ ๋ฐ ํด๊ฒฐ ๋ฐฉ๋ฒ ์ ๋ฆฌ
์ด์ ์ ํด๊ฒฐํ๋ค๊ณ ์๊ฐํ๋ Playwright1 ๊ด๋ จ ๋ฌธ์ ๊ฐ ๋ค์ ๋ฐ์ํ๋ค.
Gatsby build ๊ณผ์ ์์ ์ง์์ ์ผ๋ก ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ค.
๋ฌธ์ : Playwright Chromium ๋ธ๋ผ์ฐ์ ๋ฒ์ ์ฐธ์กฐ ์ค๋ฅ2
- Gatsby ๋ธ๋ก๊ทธ์ ๋ฐฐํฌ๋ฅผ ์ํ GitHub Actions์์ Playwright ์ค์น ์, ์ค๋๋ Chromium ๋ธ๋ผ์ฐ์ ๋ฒ์ (์: chromium-1129)์ ๊ณ์ ์ฐธ์กฐํ๋ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋ค.
- ์บ์๋ฅผ ๋น์๋ ํด๊ฒฐ๋์ง ์๊ฑฐ๋, ์ต์ ๋ธ๋ผ์ฐ์ ๋ฒ์ (chromium-1134)์ ์ฌ๋ฐ๋ฅด๊ฒ ์ฌ์ฉํ์ง ๋ชปํ๋ค.
-
browserType.launch: Executable doesn't exist at /home/runner/.cache/ms-playwright/chromium-1129/chrome-linux/chrome
๋ฌธ์ ๋ถ์
- ์ด์ ์ ์บ์๋ Playwright ๋ธ๋ผ์ฐ์ ๊ฒฝ๋ก๊ฐ GitHub Actions์์ ์ฐธ์กฐ๋๋ฉด์, ์ต์ ๋ฒ์ ์ค์น ํ์๋ ์๋ชป๋ ๊ฒฝ๋ก๋ฅผ ์ฌ์ฉํจ.
- Playwright ๊ฒฝ๋ก๋ฅผ ๋ช ํํ๊ฒ ์ง์ ํ์ง ์์ Gatsby ๋น๋์์ ๋ฌธ์ ๊ฐ ๋ฐ์ํจ.
Playwright ์ํคํ ์ฒ ์ดํด
๋ฌธ์ ๋ฅผ ์ ๋๋ก ํด๊ฒฐํ๋ ค๋ฉด, ๋จผ์ Playwright๊ฐ ์ด๋ป๊ฒ ๋์ํ๋์ง ์ดํดํด์ผ ํ๋ค.
๋ธ๋ผ์ฐ์ ์์ง ์ข ๋ฅ
Playwright๋ ์ธ ๊ฐ์ง ๋ธ๋ผ์ฐ์ ์์ง์ ์ง์ํ๋ค.
| ์์ง | ๊ธฐ๋ฐ | ํน์ง |
|---|---|---|
| Chromium | Google Chromium | Chrome, Edge์ ๋์ผ ์์ง. ๊ฐ์ฅ ๋๋ฆฌ ์ฐ์ |
| Firefox | Mozilla Gecko | Firefox ์ค์ ์์ง. ์น ํ์ค ์ค์ ํ ์คํธ์ ์ ํฉ |
| WebKit | Apple WebKit | Safari์ ๋์ผ ์์ง. iOS/macOS ๋์ ํ์ธ์ ํ์ |
๊ฐ ๋ธ๋ผ์ฐ์ ์์ง์ Playwright ํจํค์ง์ ๋ณ๋๋ก ๋ฐ์ด๋๋ฆฌ ํํ๋ก ์ค์น๋๋ค. ์ฆ, npm install playwright๋ฅผ ํด๋ ๋ธ๋ผ์ฐ์ ๋ฐ์ด๋๋ฆฌ ์์ฒด๋ ๋ฐ๋ก ๋ด๋ ค๋ฐ์์ผ ํ๋ค. ์ด ๋ฐ์ด๋๋ฆฌ๋ ๊ธฐ๋ณธ์ ์ผ๋ก ~/.cache/ms-playwright/ ์๋์ ๋ฒ์ ๋ณ๋ก ์ ์ฅ๋๋ค.
~/.cache/ms-playwright/
โโโ chromium-1134/
โ โโโ chrome-linux/
โ โโโ chrome โ ์คํ ํ์ผ
โโโ firefox-1458/
โ โโโ firefox/
โ โโโ firefox
โโโ webkit-2067/
โโโ ...Playwright๋ ์ค์น ์์ ์ ๋ฒ์ ๋ฒํธ์ ์ค์ ๋ฐ์ด๋๋ฆฌ ๊ฒฝ๋ก๋ฅผ ๋ด๋ถ์ ์ผ๋ก ๋งคํํด ๊ด๋ฆฌํ๋ค. ์ด ๋งคํ์ด ์ด๊ธ๋๋ฉด Executable doesn't exist ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ค.
์ CI ํ๊ฒฝ์์ ๋ค๋ฅด๊ฒ ๋์ํ๋๊ฐ
๋ก์ปฌ์์ ๋ฉ์ฉกํ ๋์๊ฐ๋ Playwright๊ฐ CI์์ ํฐ์ง๋ ์ด์ ๋ ํฌ๊ฒ ์ธ ๊ฐ์ง๋ค.
1. ์๋๋ฐ์ค(Sandbox) ๋ฌธ์
Chromium์ ๊ธฐ๋ณธ์ ์ผ๋ก OS ์์ค์ ์๋๋ฐ์ค๋ฅผ ํ์ฑํํ๋ค. ๋ก์ปฌ ๋จธ์ ์์๋ ์ด ์๋๋ฐ์ค๊ฐ ์ ์์ ์ผ๋ก ์๋ํ์ง๋ง, GitHub Actions์ Ubuntu ๋ฌ๋์ฒ๋ผ ์ปจํ ์ด๋ ๊ธฐ๋ฐ ํ๊ฒฝ์์๋ ์๋๋ฐ์ค์ ํ์ํ ๊ถํ์ด ์์ด ์คํ ์์ฒด๊ฐ ์คํจํ๋ค.
# ์ด๋ฐ ์ค๋ฅ๊ฐ ๋์ค๋ฉด ์๋๋ฐ์ค ๋ฌธ์
[0913/120000.123:FATAL:zygote_host_impl_linux.cc(128)] No usable sandbox!์ด ๊ฒฝ์ฐ --no-sandbox ์ต์
์ ๋๊ฒจ์ค์ผ ํ๋ค.
// playwright.config.ts
use: {
launchOptions: {
args: ['--no-sandbox', '--disable-setuid-sandbox'],
},
},๋จ, --no-sandbox๋ ๋ณด์์ ์ฝํ์ํค๋ ์ต์
์ด๋ฏ๋ก ๋ก์ปฌ ๊ฐ๋ฐ ํ๊ฒฝ์๋ ์ฌ์ฉํ์ง ์๋ ๊ฒ์ด ์ข๋ค. CI ํ๊ฒฝ์์๋ง ์กฐ๊ฑด๋ถ๋ก ํ์ฑํํ๊ฑฐ๋, ๊ณต์ Playwright Docker ์ด๋ฏธ์ง๋ฅผ ์ฌ์ฉํ๋ฉด ์ด ๋ฌธ์ ๋ฅผ ์ฐํํ ์ ์๋ค.
2. ํค๋๋ฆฌ์ค(Headless) ๋ชจ๋
CI ํ๊ฒฝ์๋ ๋์คํ๋ ์ด ์๋ฒ(X11)๊ฐ ์๋ค. Playwright๋ ๊ธฐ๋ณธ์ ์ผ๋ก headless: true๋ก ์คํ๋๊ธฐ ๋๋ฌธ์ ๋๋ถ๋ถ ๋ฌธ์ ์์ง๋ง, ์ผ๋ถ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ ์ค์ ์ด GUI๋ฅผ ์๊ตฌํ๋ฉด ์ค๋ฅ๊ฐ ๋๋ค.
// ๋ช
์์ ์ผ๋ก headless ์ค์
use: {
headless: true,
},3. ์์คํ ์์กด์ฑ ๋๋ฝ
Chromium์ ๋จ๋
์คํ ํ์ผ์ด ์๋๋ค. ๋ฆฌ๋
์ค์์ ๋์ํ๋ ค๋ฉด ์์ญ ๊ฐ์ ๊ณต์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ํ์ํ๋ค (libglib, libnss, libfontconfig ๋ฑ). GitHub Actions์ ๊ธฐ๋ณธ Ubuntu ์ด๋ฏธ์ง์๋ ์ด๋ฐ ์์กด์ฑ์ด ๋ชจ๋ ๊ฐ์ถฐ์ ธ ์์ง ์๋ค.
npx playwright install --with-deps ๋ช
๋ น์ --with-deps ํ๋๊ทธ๊ฐ ๋ฐ๋ก ์ด ์์กด์ฑ์ OS ํจํค์ง ๋งค๋์ ๋ก ์๋ ์ค์นํด์ฃผ๋ ์ญํ ์ ํ๋ค.
CI ํ๊ฒฝ์์ ์์ฃผ ๋ง๋๋ Playwright ์ค๋ฅ๋ค
์ค๋ฅ 1: Executable doesn't exist
browserType.launch: Executable doesn't exist at
/home/runner/.cache/ms-playwright/chromium-1129/chrome-linux/chrome์์ธ: Playwright ํจํค์ง ๋ฒ์ ๊ณผ ์ค์น๋ ๋ธ๋ผ์ฐ์ ๋ฐ์ด๋๋ฆฌ ๋ฒ์ ์ด ๋ถ์ผ์นํ๋ค. ์ฃผ๋ก ๋ค์ ์ํฉ์์ ๋ฐ์ํ๋ค.
- ์ด์ ์บ์๋ ๋ฐ์ด๋๋ฆฌ๊ฐ ๋จ์์๋๋ฐ ํจํค์ง๋ ์ ๋ฐ์ดํธ๋ ๊ฒฝ์ฐ
playwright install์ ์คํํ์ง ์๊ณplaywrightํจํค์ง๋ง ์ค์นํ ๊ฒฝ์ฐ- ์บ์ ํค๊ฐ ์๋ชป ์ค์ ๋์ด ๋ก์ ๋ฐ์ด๋๋ฆฌ๋ฅผ ์ฌ์ฌ์ฉํ๋ ๊ฒฝ์ฐ
ํด๊ฒฐ:
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium๋๋ ์บ์๊ฐ ๋ฌธ์ ๋ผ๋ฉด ๊ฐ์ ์ญ์ ํ ์ฌ์ค์น:
- name: Clear Playwright Cache and Reinstall
run: |
rm -rf ~/.cache/ms-playwright
npx playwright install --with-deps chromium์ค๋ฅ 2: Host system is missing dependencies
browserType.launch: Host system is missing dependencies!
Missing libraries:
libgbm.so.1
libglib-2.0.so.0
libnss3.so
...์์ธ: Chromium ์คํ์ ํ์ํ ์์คํ
๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์๋ค. --with-deps ์์ด playwright install๋ง ์คํํ๊ฑฐ๋, ์ต์ Docker ์ด๋ฏธ์ง๋ฅผ ์ฌ์ฉํ ๋ ๋ฐ์ํ๋ค.
ํด๊ฒฐ:
# --with-deps ํ๋๊ทธ๋ก ์์กด์ฑ ์๋ ์ค์น
- name: Install Playwright with Dependencies
run: npx playwright install --with-deps๋๋ ์๋์ผ๋ก ์์กด์ฑ ์ค์น:
# Ubuntu/Debian ๊ธฐ์ค
sudo apt-get install -y \
libgbm-dev \
libnss3 \
libatk-bridge2.0-0 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
libglib2.0-0์ค๋ฅ 3: Error: spawn ENOENT
Error: spawn /home/runner/.cache/ms-playwright/chromium-1134/chrome-linux/chrome ENOENT์์ธ: ์คํ ํ์ผ ์์ฒด๊ฐ ์๊ฑฐ๋ ์คํ ๊ถํ์ด ์๋ค. ENOENT๋ "Error NO ENTry"์ ์ฝ์๋ก ํ์ผ์ด ์กด์ฌํ์ง ์์์ ์๋ฏธํ๋ค.
ํด๊ฒฐ:
# ์ค์น ํ ํ์ผ ์กด์ฌ ํ์ธ
ls -la ~/.cache/ms-playwright/chromium-*/chrome-linux/chrome
# ์คํ ๊ถํ ํ์ธ ๋ฐ ๋ถ์ฌ
chmod +x ~/.cache/ms-playwright/chromium-*/chrome-linux/chrome์ค๋ฅ 4: Timeout 30000ms exceeded
browserType.launch: Timeout 30000ms exceeded.์์ธ: CI ํ๊ฒฝ์ ํ๋์จ์ด ์ฑ๋ฅ์ด ๋ฎ์ ๋ธ๋ผ์ฐ์ ์์์ 30์ด ์ด์ ๊ฑธ๋ฆฌ๊ฑฐ๋, ๋คํธ์ํฌ ์ง์ฐ์ผ๋ก ๋ฆฌ์์ค ๋ก๋๊ฐ ๋๋ฆฐ ๊ฒฝ์ฐ๋ค.
ํด๊ฒฐ:
// playwright.config.ts
export default defineConfig({
timeout: 60000, // ํ
์คํธ ์ ์ฒด ํ์์์ (60์ด)
expect: {
timeout: 10000, // expect() ํ์์์ (10์ด)
},
use: {
actionTimeout: 15000, // ๊ฐ ์ก์
ํ์์์ (15์ด)
navigationTimeout: 30000, // ํ์ด์ง ์ด๋ ํ์์์ (30์ด)
},
});GitHub Actions ๋ ๋ฒจ์์๋ ํ์์์์ ์ค์ ํด๋๋ฉด ๋ฌดํ ๋๊ธฐ๋ฅผ ๋ฐฉ์งํ ์ ์๋ค:
jobs:
test:
timeout-minutes: 30
runs-on: ubuntu-latestPlaywright + Docker์์์ ์ค์
๋ก์ปฌ ๊ฐ๋ฐ๊ณผ CI ํ๊ฒฝ์ ์ฐจ์ด๋ฅผ ์์ ํ ์์ ๋ ๊ฐ์ฅ ํ์คํ ๋ฐฉ๋ฒ์ Docker๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด๋ค.
๊ณต์ Playwright Docker ์ด๋ฏธ์ง ์ฌ์ฉ
Playwright ํ์ ๋ชจ๋ ์์กด์ฑ์ด ์ฌ์ ์ค์น๋ ๊ณต์ Docker ์ด๋ฏธ์ง๋ฅผ ์ ๊ณตํ๋ค.
# Playwright ๊ณต์ ์ด๋ฏธ์ง โ ๋ฒ์ ์ playwright ํจํค์ง ๋ฒ์ ๊ณผ ๋ง์ถฐ์ผ ํ๋ค
FROM mcr.microsoft.com/playwright:v1.47.0-jammy
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
# ํ
์คํธ ์คํ
CMD ["npx", "playwright", "test"]GitHub Actions์์ ์ด ์ด๋ฏธ์ง๋ฅผ ์ง์ ์ง์ ํ ์๋ ์๋ค:
jobs:
test:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.47.0-jammy
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Run Playwright tests
run: npx playwright test๊ณต์ ์ด๋ฏธ์ง๋ฅผ ์ฌ์ฉํ๋ฉด --with-deps๋ --no-sandbox ๊ฐ์ ์ถ๊ฐ ์ค์ ์์ด๋ ์์ ์ ์ผ๋ก ๋์ํ๋ค.
์ปค์คํ Dockerfile์์ ์์กด์ฑ ์ค์น
๊ธฐ์กด Node.js ์ด๋ฏธ์ง ๊ธฐ๋ฐ์์ Playwright๋ฅผ ์ฌ์ฉํด์ผ ํ๋ค๋ฉด, ์์กด์ฑ์ ์ง์ ์ค์นํด์ผ ํ๋ค.
FROM node:20-bookworm-slim
# Playwright ์์กด์ฑ ์ค์น
RUN apt-get update && apt-get install -y \
libnss3 \
libnspr4 \
libdbus-1-3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libxkbcommon0 \
libxcomposite1 \
libxdamage1 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libasound2 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY package*.json ./
RUN npm ci
# ๋ธ๋ผ์ฐ์ ๋ฐ์ด๋๋ฆฌ ์ค์น
RUN npx playwright install chromium
COPY . .GitHub Actions ์บ์ฑ ์ต์ ํ
CI๋ฅผ ๋งค๋ฒ ์คํํ ๋๋ง๋ค node_modules์ ๋ธ๋ผ์ฐ์ ๋ฐ์ด๋๋ฆฌ๋ฅผ ์๋ก ๋ด๋ ค๋ฐ์ผ๋ฉด ์๊ฐ์ด ์ค๋ ๊ฑธ๋ฆฐ๋ค. ์บ์ฑ์ ์ ์ค์ ํ๋ฉด ์คํ ์๊ฐ์ ํฌ๊ฒ ์ค์ผ ์ ์๋ค.
node_modules ์บ์ฑ
- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm cihashFiles('**/package-lock.json')์ ์บ์ ํค๋ก ์ฌ์ฉํ๋ฉด package-lock.json์ด ๋ณ๊ฒฝ๋ ๋๋ง ์บ์๊ฐ ๋ฌดํจํ๋๋ค. yarn์ ์ฌ์ฉํ๋ค๋ฉด yarn.lock์ ๊ธฐ์ค์ผ๋ก ํ๋ค.
# yarn ์ฌ์ฉ ์
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}Playwright ๋ธ๋ผ์ฐ์ ์บ์ฑ (๊ณต์ ๊ถ์ฅ ๋ฐฉ๋ฒ)
Playwright ํ์ด ๊ณต์์ ์ผ๋ก ๊ถ์ฅํ๋ ๋ธ๋ผ์ฐ์ ๋ฐ์ด๋๋ฆฌ ์บ์ฑ ๋ฐฉ๋ฒ์ด๋ค.6
- name: Cache Playwright Browsers
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}
- name: Install Playwright Browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
- name: Install Playwright System Dependencies
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps์บ์ ํํธ ์ฌ๋ถ์ ๋ฐ๋ผ ๋ถ๊ธฐํ๋ ๊ฒ์ด ํต์ฌ์ด๋ค.
- ์บ์ ๋ฏธ์ค:
--with-deps๋ก ๋ฐ์ด๋๋ฆฌ + ์์คํ ์์กด์ฑ ๋ชจ๋ ์ค์น - ์บ์ ํํธ: ๋ฐ์ด๋๋ฆฌ๋ ์บ์์์ ๋ณต์๋๋ฏ๋ก ์์คํ
์์กด์ฑ(
install-deps)๋ง ์ค์น
์ด๋ ๊ฒ ํ๋ฉด ์บ์ ํํธ ์ ์์ญ~์๋ฐฑ MB์ ๋ค์ด๋ก๋๋ฅผ ๊ฑด๋๋ธ ์ ์๋ค.
์บ์ ํค ์ ๋ต ์์ฝ
| ์บ์ ๋์ | ๊ถ์ฅ ํค ํจํด | ๋ฌดํจํ ์์ |
|---|---|---|
| node_modules | OS-node-hash(package-lock.json) |
ํจํค์ง ์์กด์ฑ ๋ณ๊ฒฝ ์ |
| Playwright ๋ฐ์ด๋๋ฆฌ | OS-playwright-hash(package-lock.json) |
playwright ํจํค์ง ๋ฒ์ ๋ณ๊ฒฝ ์ |
| Gatsby .cache | OS-gatsby-hash(gatsby-config.js) |
์ค์ ๋ณ๊ฒฝ ์ |
E2E ํ ์คํธ ์ค์
playwright.config.ts ๊ธฐ๋ณธ ์ค์
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
// ํ
์คํธ ํ์ผ ๊ฒฝ๋ก
testDir: './e2e',
// ์ ์ฒด ํ
์คํธ ํ์์์ (ms)
timeout: 30000,
// expect() ํ์์์
expect: {
timeout: 5000,
},
// ํ
์คํธ ์คํจ ์ ์ฌ์๋ ํ์ (CI์์๋ 2ํ, ๋ก์ปฌ์์๋ 0ํ)
retries: process.env.CI ? 2 : 0,
// ๋ณ๋ ฌ ์คํ ์์ปค ์
// CI ํ๊ฒฝ์ ๋ฆฌ์์ค ์ ํ์ด ์์ผ๋ฏ๋ก ์ ํ
workers: process.env.CI ? 1 : undefined,
// ๋ฆฌํฌํธ ์ค์
reporter: [
['html', { outputFolder: 'playwright-report', open: 'never' }],
['list'],
],
// ๋ชจ๋ ํ
์คํธ์ ๊ณตํต ์ ์ฉ๋๋ ์ค์
use: {
// ํ
์คํธ ๋์ URL
baseURL: 'http://localhost:8000',
// ์คํจ ์ ํธ๋ ์ด์ค ์์ง
trace: 'on-first-retry',
// ์คํจ ์ ์คํฌ๋ฆฐ์ท
screenshot: 'only-on-failure',
// ์คํจ ์ ๋น๋์ค ๋
นํ
video: 'on-first-retry',
// headless ๋ชจ๋ (CI์์๋ ํญ์ true)
headless: true,
},
// ํ
์คํธํ ๋ธ๋ผ์ฐ์ /๋๋ฐ์ด์ค ๋ชฉ๋ก
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'Mobile Chrome',
use: { ...devices['Pixel 5'] },
},
],
// ํ
์คํธ ์ ๋ก์ปฌ ์๋ฒ ์๋ ์์
webServer: {
command: 'yarn serve',
url: 'http://localhost:9000',
reuseExistingServer: !process.env.CI,
timeout: 120000,
},
});ํ ์คํธ ๋ณ๋ ฌ ์คํ
Playwright๋ ๊ธฐ๋ณธ์ ์ผ๋ก ์ฌ๋ฌ ์์ปค๋ฅผ ๋์ ํ ์คํธ๋ฅผ ๋ณ๋ ฌ๋ก ์คํํ๋ค. ๋ก์ปฌ ํ๊ฒฝ์์๋ CPU ์ฝ์ด ์์ ๋ง๊ฒ ์๋์ผ๋ก ์ค์ ๋์ง๋ง, CI์์๋ ์กฐ์ ์ด ํ์ํ ์ ์๋ค.
// playwright.config.ts
// ๋ฐฉ๋ฒ 1: ์์ปค ์ ๊ณ ์
workers: process.env.CI ? 2 : 4,
// ๋ฐฉ๋ฒ 2: ํ์ผ ๋จ์ ๋ณ๋ ฌ ์คํ๋ง ํ์ฉ (ํ์ผ ๋ด์์๋ ์์ฐจ)
fullyParallel: false,
// ๋ฐฉ๋ฒ 3: ํน์ ํ
์คํธ ํ์ผ์์๋ง ์์ฐจ ์คํ ๊ฐ์
// test.describe.serial('...', () => { ... });GitHub Actions์ ๋งคํธ๋ฆญ์ค ์ ๋ต์ผ๋ก ์ค๋ฉ(sharding)์ ํ์ฉํ๋ฉด ์ฌ๋ฌ ๋ฌ๋์์ ํ ์คํธ๋ฅผ ๋๋ ์คํํ ์ ์๋ค:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
shard: [1, 2, 3, 4]
steps:
- name: Run Playwright tests (shard)
run: npx playwright test --shard=${{ matrix.shard }}/4๋ฆฌํฌํธ ์ค์ (HTML ๋ฆฌํฌํธ)
- name: Run Playwright tests
run: npx playwright test
- name: Upload HTML Report
uses: actions/upload-artifact@v4
if: always() # ํ
์คํธ ์คํจํด๋ ๋ฆฌํฌํธ ์
๋ก๋
with:
name: playwright-report
path: playwright-report/
retention-days: 30retention-days: 30์ผ๋ก 30์ผ๊ฐ ๋ณด๊ด๋๋ค. ์ํฐํฉํธ ํ์ด์ง์์ ์ง์ HTML ๋ฆฌํฌํธ๋ฅผ ๋ค์ด๋ฐ์ ์ด์ด๋ณผ ์ ์๋ค.
Playwright ํ ์คํธ ๋๋ฒ๊น
--headed ๋ชจ๋๋ก ๋ก์ปฌ ๋๋ฒ๊น
CI์์ ์คํจํ๋ ํ
์คํธ๋ฅผ ๋ก์ปฌ์์ ์ฌํํ ๋, --headed ์ต์
์ผ๋ก ์ค์ ๋ธ๋ผ์ฐ์ ์ฐฝ์ ๋์ ๋์ผ๋ก ํ์ธํ ์ ์๋ค.
# headed ๋ชจ๋๋ก ์คํ (๋ธ๋ผ์ฐ์ ์ฐฝ์ด ๋ฌ๋ค)
npx playwright test --headed
# ํน์ ํ
์คํธ๋ง headed๋ก ์คํ
npx playwright test e2e/home.spec.ts --headed
# ๋๋ฆฌ๊ฒ ์คํ (๊ฐ ์ก์
์ฌ์ด์ 500ms ์ง์ฐ)
npx playwright test --headed --slow-mo=500PWDEBUG=1 ํ๊ฒฝ๋ณ์
PWDEBUG=1์ ์ค์ ํ๋ฉด Playwright Inspector๊ฐ ์ด๋ฆฐ๋ค. ๋จ๊ณ๋ณ๋ก ํ
์คํธ๋ฅผ ์คํํ๊ณ , ์ ํ์๋ฅผ ์ค์๊ฐ์ผ๋ก ํ
์คํธํ ์ ์๋ ๊ฐ๋ ฅํ ๋๋ฒ๊น
๋๊ตฌ๋ค.
# Playwright Inspector ์ด๊ธฐ
PWDEBUG=1 npx playwright test
# Windows PowerShell
$env:PWDEBUG=1; npx playwright testInspector์์ ํ ์ ์๋ ๊ฒ๋ค:
- ํ ์คํธ๋ฅผ ๋จ๊ณ๋ณ๋ก ์คํ/์ผ์์ ์ง
- DOM ์์์ ๋ง์ฐ์ค๋ฅผ ์ฌ๋ ค ์ ํ์ ์๋ ์ ์
- ํ์ฌ ํ์ด์ง ์ํ ์ค๋ ์ท ํ์ธ
- ์ก์ ๋ก๊ทธ ์ค์๊ฐ ํ์ธ
์คํฌ๋ฆฐ์ท/๋น๋์ค ๋ นํ
ํ ์คํธ ์คํจ ์์ธ์ ํ์ ํ๋ ๊ฐ์ฅ ์ง๊ด์ ์ธ ๋ฐฉ๋ฒ์ ์คํฌ๋ฆฐ์ท๊ณผ ๋น๋์ค๋ค.
// playwright.config.ts โ ์ ์ญ ์ค์
use: {
// 'off' | 'on' | 'only-on-failure' | 'retain-on-failure'
screenshot: 'only-on-failure',
// 'off' | 'on' | 'retain-on-failure' | 'on-first-retry'
video: 'on-first-retry',
// 'off' | 'on' | 'retain-on-failure' | 'on-all-retries' | 'on-first-retry'
trace: 'on-first-retry',
},ํ ์คํธ ์ฝ๋ ์์์ ์๋์ผ๋ก ์ฐ์ ์๋ ์๋ค:
test('๋ธ๋ก๊ทธ ํ ๋ ๋๋ง ํ์ธ', async ({ page }) => {
await page.goto('/');
// ํน์ ์์ ์ ์คํฌ๋ฆฐ์ท ์ ์ฅ
await page.screenshot({ path: 'screenshots/home.png', fullPage: true });
// ํน์ ์์๋ง ์บก์ฒ
const header = page.locator('header');
await header.screenshot({ path: 'screenshots/header.png' });
await expect(page).toHaveTitle(/Gatsby Blog/);
});ํธ๋ ์ด์ค(Trace) ๋ทฐ์ด
Playwright์ ํธ๋ ์ด์ค๋ ํ ์คํธ ์คํ ์ค ๋ชจ๋ ์ก์ , ๋คํธ์ํฌ ์์ฒญ, ์ฝ์ ๋ก๊ทธ, ์คํฌ๋ฆฐ์ท์ ํ์๋ผ์ธ ํํ๋ก ๊ธฐ๋กํ๋ค.
# ํธ๋ ์ด์ค ํ์ผ ์ด๊ธฐ
npx playwright show-trace trace.zipCI์์ ์์งํ ํธ๋ ์ด์ค๋ฅผ ์ํฐํฉํธ๋ก ๋ด๋ ค๋ฐ์ ๋ก์ปฌ์์ ๋ถ์ํ ์ ์๋ค:
- name: Upload traces on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-traces
path: test-results/ํด๊ฒฐ ๋ฐฉ๋ฒ (๊ธฐ์กด)
์ฒ์ ๋ฐ์ํ ๋ฌธ์ ์ ๋ํด ์๋ํ๋ ํด๊ฒฐ ๋ฐฉ๋ฒ๋ค์ ์ ๋ฆฌํ๋ค.
์๋ 1: Playwright ์บ์ ๊ฐ์ ์ญ์
- ์บ์๋ Playwright ๋ธ๋ผ์ฐ์ ํ์ผ๋ค์ ๊ฐ์ ๋ก ์ญ์ ํ ํ, ์ต์ ๋ฒ์ ์ผ๋ก ๋ค์ ์ค์นํ์๋ค.
-
- name: Remove Playwright Cache run: | rm -rf ~/.cache/ms-playwright rm -rf ~/work/<your-repo-name>/<your-repo-name>/.cache/ms-playwright - ์์ฉ์ ์์๋ค.
์๋ 2: Chromium ๊ฒฝ๋ก ๋ช ํํ ์ง์
- Playwright ๋ธ๋ผ์ฐ์ ๋ฅผ ์ค์นํ ํ, ์ต์ Chromium ๊ฒฝ๋ก๋ฅผ ํ์ธํ์ฌ ๋ช ํํ๊ฒ ์ค์ ํ๋ค.
- ์ด๋ฅผ ํ๊ฒฝ ๋ณ์์ ์ ์ฅํ์ฌ GitHub Actions์ Gatsby ๋น๋ ์ ๋ช ์์ ์ผ๋ก ํด๋น ๊ฒฝ๋ก๋ฅผ ์ฐธ์กฐํ๊ฒํ๋ค.
-
- name: Install Playwright and Set Browser Path run: | npx playwright install --with-deps chromium CHROMIUM_DIR=$(ls -d $HOME/.cache/ms-playwright/chromium-*/ | sort -V | tail -n 1) echo "CHROMIUM_DIR=$CHROMIUM_DIR" >> $GITHUB_ENV ls -al $CHROMIUM_DIR - ์์ฉ์ ์์๋ค.
์๋ 3: ๋น๋ ์ Playwright ๊ฒฝ๋ก ํ์ธ
- ๋น๋ ๋์ค Playwright ๋ธ๋ผ์ฐ์ ๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ค์น๋์๋์ง, ๊ทธ๋ฆฌ๊ณ ์ ํํ ๊ฒฝ๋ก๋ฅผ ์ฐธ์กฐํ๊ณ ์๋์ง ํ์ธํ๋ ๋ก๊ทธ๋ฅผ ์ถ๊ฐํ์ฌ ๋๋ฒ๊น ์ ํ์ฉํ๋ค.
-
- name: Verify Playwright Installation and Path run: | npx playwright --version echo "Using Chromium from: $CHROMIUM_DIR" ls -al $CHROMIUM_DIR
์๋ 4: ๋น๋ ์ gatsby ์บ์ ์ญ์
- ๋น๋ ์คํ ์ ์
package.json์ ์ค์ ํด๋ cache clean ๋ช ๋ น์ด๋ฅผ ๋ฏธ๋ฆฌ ์ฌ์ฉํ์ฌ ๋น๋ ์ ์ด์ cache๋ฅผ ์ฌ์ฉํ์ง ์๊ณ ๋น๋ํ์ฌ ์ฌ๋ฐ๋ฅธ ๋๋ ํ ๋ฆฌ๋ฅผ ์ฐพ๋๋ก ํ์๋ค. -
- name: Build with Gatsby env: PREFIX_PATHS: "true" CHROMIUM_DIR: ${{ env.CHROMIUM_DIR }} run: | yarn clean yarn build
์ต์ข CI/CD ์ํฌํ๋ก
CI/CD ์ ์ฒด ํ์ดํ๋ผ์ธ ํ๋ฆ
CI ํ์ดํ๋ผ์ธ (์บ์ฑ + ์ํฐํฉํธ ์ถ๊ฐ)
- ์ต์ Playwright ๋ธ๋ผ์ฐ์ ๋ฅผ
$HOME/.cache/ms-playwright๊ฒฝ๋ก์ ์ค์นํ๊ณ , ์ด ๋ฒ์ ์ ๊ฒฝ๋ก๋ฅผ ํ๊ฒฝ ๋ณ์๋ก ์ค์ ํ์ฌ ๋น๋ ๊ณผ์ ์์ ํ์ฉํ์๋ค. - ๋, pull request์ push ์ํฉ์ ๋๋์ด ๊ด๋ฆฌํ์๋ค.
- node_modules์ Playwright ๋ธ๋ผ์ฐ์ ๋ฅผ ์บ์ฑํ์ฌ ์คํ ์๊ฐ์ ๋จ์ถํ์๋ค.
-
name: CI on: pull_request: branches: - main push: branches: - main jobs: check_on_pull_request: if: github.event_name == 'pull_request' runs-on: ubuntu-latest timeout-minutes: 20 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" - name: Cache node_modules uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Cache Playwright Browsers uses: actions/cache@v4 id: playwright-cache with: path: ~/.cache/ms-playwright key: ${{ runner.os }}-playwright-${{ hashFiles('**/yarn.lock') }} - name: Install node packages run: yarn - name: Install Playwright Browsers if: steps.playwright-cache.outputs.cache-hit != 'true' run: npx playwright install --with-deps chromium - name: Install Playwright System Dependencies if: steps.playwright-cache.outputs.cache-hit == 'true' run: npx playwright install-deps chromium - name: Check lint run: yarn check:lint - name: Check prettier run: yarn check:prettier build_on_push: if: github.event_name == 'push' runs-on: ubuntu-latest timeout-minutes: 30 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" - name: Cache node_modules uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Cache Playwright Browsers uses: actions/cache@v4 id: playwright-cache with: path: ~/.cache/ms-playwright key: ${{ runner.os }}-playwright-${{ hashFiles('**/yarn.lock') }} - name: Install node packages run: yarn - name: Install Playwright Browsers if: steps.playwright-cache.outputs.cache-hit != 'true' run: npx playwright install --with-deps chromium - name: Install Playwright System Dependencies if: steps.playwright-cache.outputs.cache-hit == 'true' run: npx playwright install-deps chromium - name: Build run: yarn build - name: Upload test failure artifacts uses: actions/upload-artifact@v4 if: failure() with: name: playwright-failure-artifacts path: | test-results/ playwright-report/ retention-days: 7 - name: Verify Playwright Installation run: npx playwright --version
CD ํ์ดํ๋ผ์ธ (์บ์ฑ + ์ต์ ํ)
- CI๊ฐ ์ฑ๊ณต์ ์ผ๋ก ์๋ฃ๋๋ฉด ์๋์ผ๋ก ์งํ๋๋ฉด์ build ์ ์ ์บ์ ์ญ์ ํ build๋ฅผ ์งํํ์ฌ ์ด์ ์ ์ฌ์ฉํ๋ ๊ฒฝ๋ก๊ฐ ์๋ ์๋ก์ด ๋ฒ์ ์ playwright๊ฐ ์ค์น๋ ๊ฒฝ๋ก๋ฅผ ์ฌ์ฉํ๋๋ก ํ์๋ค.
-
name: CD on: workflow_run: workflows: ["CI"] types: - completed permissions: contents: read pages: write id-token: write jobs: build: runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: Checkout Repository uses: actions/checkout@v4 - name: Setup Pages id: pages uses: actions/configure-pages@v5 with: static_site_generator: gatsby - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "20" - name: Cache node_modules uses: actions/cache@v4 with: path: node_modules key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - name: Cache Playwright Browsers uses: actions/cache@v4 id: playwright-cache with: path: ~/.cache/ms-playwright key: ${{ runner.os }}-playwright-${{ hashFiles('**/yarn.lock') }} - name: Install Project Dependencies run: yarn install - name: Install Playwright Browsers if: steps.playwright-cache.outputs.cache-hit != 'true' run: npx playwright install --with-deps chromium - name: Install Playwright System Dependencies if: steps.playwright-cache.outputs.cache-hit == 'true' run: npx playwright install-deps chromium - name: Build with Gatsby env: PREFIX_PATHS: "true" run: | yarn clean yarn build - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: ./public deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4
์ถ๊ฐ: Gatsby ํ์ด์ง ์ค์ ๋ฐ 404 ์ค๋ฅ ํด๊ฒฐ
- Node.js 20 ๋ฒ์ ์ค์น ํ
actions/configure-pages@v5์ ์ถ๊ฐํ์ฌ Gatsby ํ์ด์ง๋ฅผ ์ค์ ํ์ฌ ๋น๋๋ ๋ธ๋ก๊ทธ๊ฐ ์ ์์ ์ผ๋ก ๋ฐฐํฌ๋๋๋ก ํ๋ค. -
- name: Setup Pages id: pages uses: actions/configure-pages@v5 with: static_site_generator: gatsby
Github Pages์ ๋์ ๋ฐฉ์
- Github Pages๋ ์ ์ ์น์ฌ์ดํธ ํธ์คํ ์๋น์ค๋ก, HTML, CSS, JavaScript์ ๊ฐ์ ์ ์ ํ์ผ์ ์ ๊ณตํ๋ค.
- ์ฌ์ฉ์๊ฐ ํน์ URL์ ์ ์ํ๋ฉด, Github Pages๋ ํด๋น URL์ ๋ง๋ HTML ํ์ผ์ ์ฐพ์์ ์ ๊ณตํ๋ค.
- ๋ง์ฝ ํด๋น URL์ ๋ง๋ HTML ํ์ผ์ด ์์ผ๋ฉด, 404 ์ค๋ฅ ํ์ด์ง๋ฅผ ํ์ํ๋ค.
Gatsby์ ํน์ง
- Gatsby๋ React ๊ธฐ๋ฐ์ ์ ์ ์น์ฌ์ดํธ ์์ฑ ํ๋ ์์ํฌ๋ก ๋น๋ ๊ณผ์ ์์ ๋ชจ๋ ํ์ด์ง๋ฅผ ๋ฏธ๋ฆฌ ์์ฑํ์ฌ ์ ์ HTML ํ์ผ๋ก ์ ์ฅํ๋ค.
- ํ์ง๋ง Gatsby๋ ํด๋ผ์ด์ธํธ ์ฌ์ด๋ ๋ผ์ฐํ ์ ์ฌ์ฉํ์ฌ ํ์ด์ง ์ ํ์ ์ฒ๋ฆฌํ๋ค.3
- ์ฆ, ์ฌ์ฉ์๊ฐ ์น์ฌ์ดํธ ๋ด์์ ๋งํฌ๋ฅผ ํด๋ฆญํ๋ฉด, ์ค์ ๋ก ์๋ก์ด ํ์ด์ง๋ฅผ ์์ฒญํ๋ ๊ฒ์ด ์๋ JavaScript๋ฅผ ํตํด ํ์ด์ง ๋ด์ฉ์ ๋ณ๊ฒฝํ๋ค.
๋ฌธ์ ๋ฐ์ ์์ธ
actions/configure-pages@v54 ์ก์ ์ด ์์ผ๋ฉด, Github Pages๋ Gatsby์ ํด๋ผ์ด์ธํธ ์ฌ์ด๋ ๋ผ์ฐํ ์ ์ดํดํ์ง ๋ชปํ๋ค.5- ์ฌ์ฉ์๊ฐ Gatsby ๋ธ๋ก๊ทธ ๋ด์์ ๋งํฌ๋ฅผ ํด๋ฆญํ์ฌ ํ์ด์ง๋ฅผ ์ ํํ๋ฉด, ์ค์ ๋ก ์๋ก์ด URL์ ์ ์ํ๋ ๊ฒ์ฒ๋ผ ๋ณด์ด์ง๋ง Github Pages๋ ํด๋น URL์ ๋ง๋ HTML ํ์ผ์ ์ฐพ์ง ๋ชปํด 404 ์ค๋ฅ ํ์ด์ง๋ฅผ ํ์ํ๋ ๊ฒ์ด๋ค.
ํด๊ฒฐ ๋ฐฉ๋ฒ
actions/configure-pages@v5์ก์ ์ฌ์ฉ์ ํตํด, Gatsby ๋ธ๋ก๊ทธ์ ํน์ง์ Github Pages์ ์๋ ค์ค๋ค.- ์ด ์ก์ ์ Gatsby ๋ธ๋ก๊ทธ์ ๋น๋ ๊ฒฐ๊ณผ๋ฅผ ๋ถ์ํ์ฌ, ๊ฐ ํ์ด์ง์ ๋ํ ์ ๋ณด๋ฅผ Github Pages์ ์ ๊ณตํ๋ค.
- ๋ฐ๋ผ์ ์ฌ์ฉ์๊ฐ Gatsby ๋ธ๋ก๊ทธ ๋ด์์ ๋งํฌ๋ฅผ ํด๋ฆญํ์ฌ ํ์ด์ง๋ฅผ ์ ํํ๋๋ผ๋, Github Pages๋ ํด๋น URL์ ๋ง๋ HTML ํ์ผ์ ์ฐพ์์ ์ ๊ณตํ ์ ์๊ฒ ๋๋ค.
์์ฃผ ์ฐ๋ Playwright CLI ๋ช ๋ น์ด ์ ๋ฆฌ
์ค์ ๋ก ์์ ํ๋ฉด์ ์์ฃผ ์ฐ๊ฒ ๋๋ ๋ช ๋ น์ด๋ฅผ ์ ๋ฆฌํด๋๋ค.
# ๋ธ๋ผ์ฐ์ ์ค์น
npx playwright install # ๋ชจ๋ ๋ธ๋ผ์ฐ์ ์ค์น
npx playwright install chromium # Chromium๋ง ์ค์น
npx playwright install --with-deps chromium # ์์คํ
์์กด์ฑ ํฌํจ ์ค์น
npx playwright install-deps # ์์คํ
์์กด์ฑ๋ง ์ค์น
# ํ
์คํธ ์คํ
npx playwright test # ๋ชจ๋ ํ
์คํธ ์คํ
npx playwright test home.spec.ts # ํน์ ํ์ผ๋ง ์คํ
npx playwright test --headed # ๋ธ๋ผ์ฐ์ ์ฐฝ ๋์์ ์คํ
npx playwright test --debug # Inspector ์ด์ด์ ๋จ๊ณ ์คํ
# ๋ฆฌํฌํธ
npx playwright show-report # HTML ๋ฆฌํฌํธ ์ด๊ธฐ
npx playwright show-trace trace.zip # ํธ๋ ์ด์ค ๋ทฐ์ด ์ด๊ธฐ
# ์ฝ๋ ์์ฑ (์ก์
์ ๊ธฐ๋กํด์ ํ
์คํธ ์ฝ๋ ์๋ ์์ฑ)
npx playwright codegen https://example.com
# ๋ฒ์ ํ์ธ
npx playwright --version๊ฒฐ๋ก
Playwright ๊ฒฝ๋ก ๋ฌธ์
์ต์ playwright ๋ฒ์ ์ ํ์ธํ๊ณ , ํด๋น ๋ฒ์ ์ ์ต์ playwright๋ฅผ ์ฌ์ฉํ๋๋ก, ์ด์ ์บ์๋ฅผ ์ญ์ ํจ์ผ๋ก์จ ์ํ๋ ๋๋ก ์ต์ playwright๋ฅผ ์ฌ์ฉํ๋๋ก ์ง์ ํ ์ ์์๋ค.
๊ทผ๋ณธ์ ์ผ๋ก๋ Playwright ํจํค์ง ๋ฒ์ ๊ณผ ๋ธ๋ผ์ฐ์ ๋ฐ์ด๋๋ฆฌ ๋ฒ์ ์ ๋งคํ์ด ์ด๊ธ๋๋ ๊ฒ์ด ์์ธ์ด๋ค. ์ด๋ฅผ ๋ฐฉ์งํ๋ ค๋ฉด:
yarn.lock/package-lock.json๊ธฐ์ค์ผ๋ก ์บ์ ํค๋ฅผ ์ค์ ํ๋คnpx playwright install --with-deps๋ก ํจํค์ง ๋ฒ์ ์ ๋ง๋ ๋ฐ์ด๋๋ฆฌ๋ฅผ ํญ์ ์๋ก ๋ด๋ ค๋ฐ๋๋ค- ์บ์ ํํธ/๋ฏธ์ค์ ๋ฐ๋ผ
install-deps์install --with-deps๋ฅผ ๋ถ๊ธฐํ๋ค
Gatsby ํ์ด์ง ์ค์ ๋ฐ 404 ์ค๋ฅ ํด๊ฒฐ
actions/configure-pages@v5 ์ก์
์ ์ถ๊ฐํ์ฌ Gatsby ํ์ด์ง๋ฅผ ์ค์ ํ๊ณ 404 ํ์ด์ง ์ค๋ฅ๋ฅผ ํด๊ฒฐํ ์ ์์๋ค.
CI/CD ํ์ดํ๋ผ์ธ ์ค๊ณ ์์น
์ด๋ฒ ๊ฒฝํ์ ํตํด ์ ๋ฆฌํ ์์ ์ ์ธ CI/CD ํ์ดํ๋ผ์ธ ์ค๊ณ ์์น์ ๋ค์๊ณผ ๊ฐ๋ค.
| ์์น | ์ ์ฉ ๋ฐฉ๋ฒ |
|---|---|
| ์บ์ ํค๋ lock ํ์ผ ๊ธฐ๋ฐ์ผ๋ก | hashFiles('**/yarn.lock') ์ฌ์ฉ |
| ์บ์ ํํธ/๋ฏธ์ค ๋ถ๊ธฐ | if: steps.cache.outputs.cache-hit != 'true' |
| ํ์์์ ๋ช ์ | timeout-minutes ์ค์ ์ผ๋ก ๋ฌดํ ๋๊ธฐ ๋ฐฉ์ง |
| ์คํจ ์ ์ํฐํฉํธ ์์ง | if: failure() + upload-artifact |
| PR๊ณผ Push ๋ถ๋ฆฌ | ์ฝ๋ ํ์ง ๊ฒ์ฌ(PR)์ ๋น๋ ๊ฒ์ฆ(Push) ์ญํ ๊ตฌ๋ถ |
- https://playwright.dev/โฉ
- https://github.com/microsoft/playwright/issues/5767โฉ
- https://playwright.dev/docs/ci#caching-browsersโฉ
- https://www.gatsbyjs.com/docs/conceptual/rendering-options/โฉ
- https://github.com/actions/configure-pages?tab=readme-ov-fileโฉ
- https://www.gatsbyjs.com/docs/how-to/previews-deploys-hosting/how-gatsby-works-with-github-pages/#github-actionsโฉ
