From 8fbec03c5ff0fb887e206b49e8387c9a9417203c Mon Sep 17 00:00:00 2001 From: loken156 Date: Thu, 16 May 2024 13:09:32 +0200 Subject: [PATCH] added cypress job --- .github/workflows/testDeploy.yml | 15 +++++++++++++++ Cypress/package.json | 8 +++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/testDeploy.yml b/.github/workflows/testDeploy.yml index 43454e7..c4881ef 100644 --- a/.github/workflows/testDeploy.yml +++ b/.github/workflows/testDeploy.yml @@ -9,9 +9,24 @@ on: # The jobs to run in this workflow are defined here. jobs: + cypress_tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + - name: Install dependencies + run: cd ./Client && npm ci + - name: Install Cypress dependencies + run: cd ./Cypress && npm ci + - name: Run Cypress + run: npm run test # The deploy job will run on the ubuntu-latest runner and will have the following steps. deploy: + needs: cypress_tests runs-on: ubuntu-latest # The steps to deploy the application to the server using SSH action. diff --git a/Cypress/package.json b/Cypress/package.json index 40c5c39..f1204ec 100644 --- a/Cypress/package.json +++ b/Cypress/package.json @@ -5,16 +5,14 @@ "main": "index.js", "scripts": { "test-ui": "cypress open --browser chrome", - "test": "cypress run --browser chrome", + "test": "cypress run --browser chrome", "make-steps": "node _auto-generate-step-definitions.js" }, "cypress-cucumber-preprocessor": { "json": { "enabled": true - }, - "stepDefinitions": [ - "/specs/step_definitions/**/*.js" - ] + } + }, "keywords": [], "author": "",