chore: rename mongodb client functions from [CRUD]Entity to [CRUD]Metadata #482
Workflow file for this run
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
| name: Docker Compose Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Build and test services | |
| run: | | |
| # Build all services | |
| docker compose build | |
| # Start all services | |
| echo "Starting all services..." | |
| docker compose up -d | |
| # Wait for services to be healthy | |
| echo "Waiting for services to be healthy..." | |
| docker compose ps | |
| # Wait for tests to complete | |
| echo "Waiting for tests to complete..." | |
| sleep 30 | |
| # Check CORE service test results | |
| if docker compose logs core | grep -q "^core | FAIL$"; then | |
| echo "CORE API tests failed!" | |
| echo "Container logs:" | |
| docker compose logs core | |
| docker compose down | |
| exit 1 | |
| elif docker compose logs core | grep -q "^core | PASS$"; then | |
| echo "CORE API tests passed!" | |
| else | |
| echo "CORE API test results not found in logs" | |
| docker compose down | |
| exit 1 | |
| fi | |
| # Check Ingestion service test results | |
| if docker compose logs ingestion | grep -q "failing" && ! docker compose logs ingestion | grep -q "0 failing"; then | |
| echo "Ingestion API tests failed!" | |
| echo "Container logs:" | |
| docker compose logs ingestion | |
| docker compose down | |
| exit 1 | |
| elif docker compose logs ingestion | grep -q "0 failing"; then | |
| echo "Ingestion API tests passed!" | |
| else | |
| echo "Ingestion API test results not found in logs" | |
| docker compose down | |
| exit 1 | |
| fi | |
| # Check Read service test results | |
| if docker compose logs read | grep -q "failing" && ! docker compose logs read | grep -q "0 failing"; then | |
| echo "Read API tests failed!" | |
| echo "Container logs:" | |
| docker compose logs read | |
| docker compose down | |
| exit 1 | |
| elif docker compose logs read | grep -q "0 failing"; then | |
| echo "Read API tests passed!" | |
| else | |
| echo "Read API test results not found in logs" | |
| docker compose down | |
| exit 1 | |
| fi | |
| ## Run E2E tests | |
| ## FIXME: https://github.com/LDFLK/nexoan/issues/117 | |
| ## FIXME: https://github.com/LDFLK/nexoan/issues/236 | |
| ## Then uncomment the following lines | |
| # echo "Running E2E tests..." | |
| # docker compose run e2e | |
| # Check E2E test results | |
| # if [ $? -eq 0 ]; then | |
| # echo "All tests passed!" | |
| # else | |
| # echo "E2E tests failed!" | |
| # exit 1 | |
| # fi | |
| # Cleanup | |
| docker compose down |