From ccad206b602d27ead5e4984a5981aeeb8259f60a Mon Sep 17 00:00:00 2001 From: Jeremy <102432453+shackstack@users.noreply.github.com> Date: Fri, 18 Aug 2023 10:55:57 +0900 Subject: [PATCH] =?UTF-8?q?infra:=20e2e=ED=85=8C=EC=8A=A4=ED=8A=B8=20ci=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e-ci.yml | 62 ++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/e2e-ci.yml diff --git a/.github/workflows/e2e-ci.yml b/.github/workflows/e2e-ci.yml new file mode 100644 index 000000000..397afca76 --- /dev/null +++ b/.github/workflows/e2e-ci.yml @@ -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