Skip to content

test

test #4

name: "[CI] 시각적 회귀 테스트"
on:
pull_request:
types:
- opened
- synchronize
paths:
- "src/components/**"
jobs:
interaction-and-accessibility:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.50.1-noble
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
check-latest: true
# install pnpm && install dependencies with cache
- name: Setup corepack
run: |
npm i -g [email protected]
corepack enable
- uses: actions/checkout@v4
with:
fetch-depth: 25
- id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT
- uses: actions/cache@v4
timeout-minutes: 5
id: cache-pnpm-store
with:
path: ${{ steps.get-store-path.outputs.STORE_PATH }}
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-
pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm install
# build storybook
- name: Build Storybook
run: pnpm build-storybook --quiet
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on tcp:6006 && DEBUG=pw:browser CI=true npx playwright test"