test #11
This file contains hidden or 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
name: "[CI] 시각적 회귀 테스트" | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
paths: | |
- "src/components/**" | |
jobs: | |
visual_regression: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
check-latest: true | |
- 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 | |
- name: Build Storybook | |
run: pnpm build-storybook | |
- name: Start Storybook | |
run: npx http-server storybook-static -p 6006 -s | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: npx playwright test | |
# - run: pnpm run build | |
# - uses: actions/cache@v4 | |
# timeout-minutes: 5 | |
# id: cache-build | |
# with: | |
# path: ./* | |
# key: ${{ github.sha }}-${{ github.run_number }}-${{ github.run_attempt}} |