From a62f02919aba0ed2e5205c0d0955715e1733760d Mon Sep 17 00:00:00 2001 From: Spytex Date: Fri, 14 Jul 2023 15:20:30 +0300 Subject: [PATCH] GitHub action check --- .github/workflows/test.yml | 31 +++++++++++-------------------- cypress.config.ts | 16 ++++++++++++++++ 2 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 cypress.config.ts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fbca9ec..5f268f9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,28 +1,19 @@ -name: Cypress Tests +name: E2E on Chrome -on: - push: - branches: - - master - pull_request: - branches: - - master +on: [push] jobs: - build-and-test: + install: runs-on: ubuntu-latest - steps: - - name: Checkout code + - name: Checkout uses: actions/checkout@v2 - - name: Setup Node.js - uses: actions/setup-node@v2 + - name: Cypress run + uses: cypress-io/github-action@v3 with: - node-version: 14 - - - name: Install dependencies - run: npm ci - - - name: Run Cypress tests - run: npm run cypress:run + project: ./site + browser: chrome + build: npm run build + start: npm run start + wait-on: "http://localhost:3000" diff --git a/cypress.config.ts b/cypress.config.ts new file mode 100644 index 0000000..085416e --- /dev/null +++ b/cypress.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from "cypress"; + +export default defineConfig({ + e2e: { + setupNodeEvents(on, config) { + // implement node event listeners here + }, + }, + + component: { + devServer: { + framework: "next", + bundler: "webpack", + }, + }, +});