-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(workflows): add setup-docker-and-run-tests.yml
- Loading branch information
Showing
3 changed files
with
45 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,45 @@ | ||
name: setup-docker-and-run-tests.yml | ||
|
||
on: [push] | ||
|
||
jobs: | ||
setup-and-start-services: | ||
name: Setup Docker and Start Services | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Fiware Environment | ||
run: | | ||
cd fiware-environment | ||
docker compose pull | ||
docker compose up -d | ||
- name: Build docker images | ||
run: | | ||
cd .. | ||
docker compose build | ||
docker compose up -d | ||
- name: Wait for service to be ready | ||
run: | | ||
until curl -s http://localhost:5173; do | ||
echo "Waiting for service to be ready..." | ||
sleep 5 | ||
done | ||
run-tests: | ||
name: Run Tests | ||
runs-on: ubuntu-latest | ||
needs: setup-and-start-services | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@4 | ||
|
||
- name: Run tests | ||
run: | | ||
cd tests | ||
python -m unittest test_crud.py |
This file was deleted.
Oops, something went wrong.