From bbec054554621abff92bbf3e1cf9ffee9d001b3f Mon Sep 17 00:00:00 2001 From: Mark Date: Sat, 3 Feb 2024 14:54:26 -0500 Subject: [PATCH] ci(github): add workflow cypress.yml --- .github/workflows/cypress.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/cypress.yml diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml new file mode 100644 index 0000000..e4ff2da --- /dev/null +++ b/.github/workflows/cypress.yml @@ -0,0 +1,37 @@ +name: cypress +on: [push, pull_request] + +jobs: + cypress: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + cache: npm + node-version-file: .nvmrc + + - name: Cypress run + uses: cypress-io/github-action@v6 + with: + browser: chrome + start: npx vite --host + wait-on: 'http://localhost:5173' + + - name: Record failed screenshots + if: failure() + uses: actions/upload-artifact@v4 + with: + name: cypress-screenshots + path: cypress/screenshots + + - name: Record videos + if: failure() + uses: actions/upload-artifact@v4 + with: + name: cypress-videos + path: cypress/videos