-
Notifications
You must be signed in to change notification settings - Fork 1
Fix/integration test runner #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
50ef45c
removed node modules in server directory
MeasureOneCodeTwice bbb926e
re-worked how tests are run
MeasureOneCodeTwice 9c85819
modification to formatting hook
MeasureOneCodeTwice 753bf7e
Merge branch 'development' into fix/integration-test-runner
MeasureOneCodeTwice ac032c2
removed node modules in server directory
MeasureOneCodeTwice d10dbab
updated workflow runner
MeasureOneCodeTwice 79fc8e5
fixed tests, removed duplicate test file
MeasureOneCodeTwice fa2cfe2
cleanup test logging
MeasureOneCodeTwice 5bacece
commit to test pipeline
MeasureOneCodeTwice 1ace1c2
Merge branch 'development' into fix/integration-test-runner
MeasureOneCodeTwice a0abdde
remove server reset key & change run test action targets
MeasureOneCodeTwice 0c7d816
made run_tests.sh executable
MeasureOneCodeTwice File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
1 change: 0 additions & 1 deletion
1
app/server/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| #!/bin/bash | ||
|
|
||
| quitting=false | ||
| quit() { | ||
| if ! $quitting; then | ||
| quitting=true | ||
| cleanup | ||
| exit 0 | ||
| fi | ||
| } | ||
| cleanup() { | ||
| echo "Cleaning up..." | ||
| docker compose -f docker-compose.test.yml -f docker-compose.yml down | ||
| } | ||
| trap quit SIGINT | ||
|
|
||
| #--- Build images --- | ||
| echo "Building app images..." | ||
| docker compose build -q | ||
| status=$? | ||
| if [ $status -ne 0 ]; then | ||
| echo "Failed to build services" | ||
| exit $status | ||
| fi | ||
|
|
||
| echo "Building test images..." | ||
| docker compose -f docker-compose.test.yml build -q | ||
| status=$? | ||
| if [ $status -ne 0 ]; then | ||
| echo "Failed to build test images" | ||
| exit $status | ||
| fi | ||
|
|
||
| #--- Launch services --- | ||
| docker compose up -d | ||
|
|
||
| #--- Wait for services to be healthy --- | ||
| source .env | ||
|
|
||
| is_app_healthy() { | ||
| echo $(curl localhost:$API_GATEWAY_PORT/health 2> /dev/null | grep -Pc '^{(\"[^\"]*\":\"ok\",?)*}$') | ||
| } | ||
|
|
||
| curr_checks=0 | ||
| max_checks=10 | ||
| while [[ healthy=$(is_app_healthy) -ne 1 ]] && [ $curr_checks -lt $max_checks ]; do | ||
| curr_checks=$(($curr_checks + 1)) | ||
| sleep 2.5 | ||
| echo "App unhealthy. Retrying ($curr_checks of $max_checks)" | ||
| done | ||
|
|
||
| if [ $healthy -ne 1 ]; then | ||
| echo "App unhealthy after $max_checks retries. Exiting" | ||
| exit 1 | ||
| fi | ||
|
|
||
| #--- Run tests --- | ||
| docker compose -f docker-compose.test.yml up --abort-on-container-failure | ||
| test_status=$? | ||
|
|
||
| if [ $test_status -eq 0 ]; then | ||
| echo '+--------------------+' | ||
| echo '| ✅ All tests pass! |' | ||
| echo '+--------------------+' | ||
| else | ||
| echo '+--------------------+' | ||
| echo '| ❌ Tests failed |' | ||
| echo '+--------------------+' | ||
|
|
||
| fi | ||
| cleanup | ||
|
|
||
| exit $test_status |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So no more market caching in client?