From 766e8320bee69adc9fcc2bcd4f6b913609ab5796 Mon Sep 17 00:00:00 2001 From: iammeghana Date: Sun, 5 May 2024 17:49:02 -0400 Subject: [PATCH] cypress_tests --- .github/workflows/cyress_tests.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cyress_tests.yml b/.github/workflows/cyress_tests.yml index 347d27cc..3dd91d72 100644 --- a/.github/workflows/cyress_tests.yml +++ b/.github/workflows/cyress_tests.yml @@ -1,7 +1,5 @@ name: Cypress Tests - on: push - jobs: cypress-run: runs-on: ubuntu-latest @@ -14,9 +12,20 @@ jobs: java-version: '11' distribution: 'temurin' architecture: x64 - - name: Build with Maven run: mvn clean install + + - name: Start application + run: mvn spring-boot:run -Dskip=true + - name: Wait for localhost page to be accessible + run: | + while true; do + if curl -s http://localhost:8070/Geoweaver -o /dev/null; then + break + else + sleep 5 + fi + done # Install npm dependencies, cache them correctly # and run all Cypress tests - name: Cypress run @@ -26,4 +35,4 @@ jobs: spec: cypress/e2e/spec.cy.js working-directory: ./cypress start: | - npx cypress run + npx cypress run \ No newline at end of file