-
Notifications
You must be signed in to change notification settings - Fork 1
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
e8d0c5f
commit bbbb9e7
Showing
1 changed file
with
20 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# Run Docker Compose to build and start the services, and capture the exit code from the test runner service | ||
docker-compose -f tests.yaml up --build --exit-code-from test-runner | ||
|
||
# Store the exit code in a variable | ||
exit_code=$? | ||
|
||
# After the tests are finished, stop and remove the containers | ||
docker-compose -f tests.yaml down | ||
|
||
# Check the exit code to determine whether the tests passed or failed | ||
if [ $exit_code -eq 0 ]; then | ||
echo "Tests passed!" | ||
else | ||
echo "Tests failed!" | ||
fi | ||
|
||
# Exit with the same exit code as the test runner service | ||
exit $exit_code |