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 42009b4 commit 4a87e55
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 6 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:
- citestbranch
paths:
- 'frontend/**'

pull_request:
branches:
- citestbranch
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
8 changes: 2 additions & 6 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '18.16.1'

- name: 🍔 Get npm cache directory
id: npm-cache-dir
id: npm-cache-dir
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache
Expand All @@ -56,10 +56,6 @@ jobs:
run: yarn install
working-directory: ${{ env.working-directory }}

- name: 🍔 eslint 테스트
run: yarn lint
working-directory: ${{ env.working-directory }}

- name: 🍔 React 프로젝트 빌드
run: yarn build
working-directory: ${{ env.working-directory }}

0 comments on commit 4a87e55

Please sign in to comment.