diff --git a/.github/workflows/CI-CD-pipeline.yml b/.github/workflows/CI-CD-pipeline.yml index c04d11e7..abcaa5e7 100644 --- a/.github/workflows/CI-CD-pipeline.yml +++ b/.github/workflows/CI-CD-pipeline.yml @@ -95,17 +95,15 @@ jobs: run: | docker load -i api_image.tar docker load -i app_test_image.tar - - name: Launch networked test application + - name: Test with mocking run: | docker network create huu-test-network - docker run --network huu-test-network -d --name backend --env HOST=0.0.0.0 api:latest docker run --network huu-test-network -d --name frontend --env VITE_HUU_API_BASE_URL=http://backend:api app:latest-test "npx vite --host" - docker run --network huu-test-network --name cypress_tests --env CYPRESS_BASE_URL="http://frontend:4040" --env CYPRESS_REAL_EMAIL="nottarealemail@gmail.com" --env CYPRESS_REAL_PASSWORD="totallyfake" app:latest-test "npx cypress run" - - name: Wait for Test to Complete + docker run --network huu-test-network --name cypress_tests --env CYPRESS_BASE_URL="http://frontend:4040" --env CYPRESS_USE_MOCK=true app:latest-test "npx cypress run" + - name: Test without mocking run: | - while [ $(docker container inspect -f '{{.State.Running}}' cypress_tests) = "true" ]; do - sleep 5 - done + docker run --network huu-test-network -d --name backend --env HOST=0.0.0.0 api:latest + docker run --network huu-test-network --name cypress_tests --env CYPRESS_BASE_URL="http://frontend:4040" --env CYPRESS_USE_MOCK=false --env CYPRESS_REAL_EMAIL="nottarealemail@gmail.com" --env CYPRESS_REAL_PASSWORD="totallyfake" app:latest-test "npx cypress run" - name: Stop Backend and Frontend Containers if: always() run: |