Skip to content

Commit

Permalink
Mock me no more! 🎭
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Douglas committed Dec 18, 2023
1 parent e99fab4 commit 3044452
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/CI-CD-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]" --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="[email protected]" --env CYPRESS_REAL_PASSWORD="totallyfake" app:latest-test "npx cypress run"
- name: Stop Backend and Frontend Containers
if: always()
run: |
Expand Down

0 comments on commit 3044452

Please sign in to comment.