From c37c042597150ebf4c14aee7cc7be1169b5bdb87 Mon Sep 17 00:00:00 2001 From: muriukialex Date: Fri, 16 Feb 2024 14:00:17 +0300 Subject: [PATCH] modify cypress run workflow --- .github/workflows/preview.yaml | 10 ++++++---- .github/workflows/production.yaml | 8 ++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 553ec34..ea03852 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -38,10 +38,12 @@ jobs: rm package-lock.json - name: Install Dependencies run: npm install - - name: Start app - run: npm run dev - - name: Run tests - run: npm run cypress:run + - name: Cypress e2e tests 🧪 + uses: cypress-io/github-action@v6.4.0 + with: + start: npm run dev + wait-on: "http://localhost:3000" + browser: chrome Deploy-Preview: runs-on: ubuntu-latest diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 13cee6f..fd9320f 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -40,8 +40,12 @@ jobs: run: npm install - name: Start app run: npm run dev - - name: Run tests - run: npm run cypress:run + - name: Cypress e2e tests 🧪 + uses: cypress-io/github-action@v6.4.0 + with: + start: npm run dev + wait-on: "http://localhost:3000" + browser: chrome Deploy-Production: runs-on: ubuntu-latest