Skip to content

Commit

Permalink
feat(workflows): add setup-docker-and-run-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
basarbyz committed Jul 25, 2024
1 parent 0029f36 commit db56d59
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 43 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/run-tests.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/setup-docker-and-run-tests.yml
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
26 changes: 0 additions & 26 deletions .github/workflows/setup-docker.yml

This file was deleted.

0 comments on commit db56d59

Please sign in to comment.