generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e99fab4
commit 3044452
Showing
1 changed file
with
5 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | | ||
|