Skip to content

Commit

Permalink
infra: e2e테스트 ci 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
shackstack committed Aug 18, 2023
1 parent 8a48edf commit ccad206
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/e2e-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: 🍔 E2E 테스트 🍔

on:
push:
branches:
- shackstack
paths:
- 'frontend/**'

pull_request:
branches:
- main
paths:
- 'frontend/**'

jobs:
E2E-test:
runs-on: ubuntu-latest
env:
working-directory: ./frontend

name: 🍔테스트 딱 대라 💢👊

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.16.1'

- name: 🍔 Get npm cache directory
id: npm-cache-dir
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/cache@v3
- name: 🍔 Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 🍔 yarn install
run: yarn install
working-directory: ${{ env.working-directory }}

- name: 🍔 E2E 테스트
uses: cypress-io/github-action@v5
with:
working-directory: ${{ env.working-directory }}
start: yarn start
browser: chrome

0 comments on commit ccad206

Please sign in to comment.