Skip to content

Commit

Permalink
Order matters. The laws of scripting say so! ⚖
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Douglas committed Dec 18, 2023
1 parent 6f038bb commit b602161
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/CI-CD-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ jobs:
docker run --network huu-test-network --name cypress_tests_mock --env CYPRESS_BASE_URL="http://frontend_mock:4040" --env CYPRESS_USE_MOCK=true app:latest-test "npx cypress run"
- name: Test without mocking
run: |
docker run --network huu-test-network -d --name frontend_nomock --env VITE_HUU_API_BASE_URL=http://backend:api app:latest-test "npx vite --host"
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_nomock --env VITE_HUU_API_BASE_URL=http://backend:api app:latest-test "npx vite --host"
sleep 10
docker exec backend curl http://localhost:8080/api/auth/signup/host -H "accept: application/json" -H "Content-Type: application/json" -d '{\"email\": \"nottarealemail@gmail.com\", \"password\": \"alskdf454$Adfa\"}'
docker run --network huu-test-network --name cypress_tests_nomock --env CYPRESS_BASE_URL="http://frontend_nomock:4040" --env CYPRESS_USE_MOCK=false --env CYPRESS_REAL_EMAIL='nottarealemail@gmail.com' --env CYPRESS_REAL_PASSWORD='alskdf454$Adfa' app:latest-test "npx cypress run"
Expand All @@ -119,10 +119,16 @@ jobs:
sleep 5
done
- name: Print microservice logs
if: always()
run: |
docker log frontend_mock
docker log backend
docker log frontend_mock
- name: Stop Backend and Frontend Containers
if: always()
run: |
docker stop backend frontend
docker stop backend frontend_mock frontend_nomock
deploy:
runs-on: ubuntu-latest
needs: [build-api, build-app]
Expand Down

0 comments on commit b602161

Please sign in to comment.