Merge pull request #36 from herrschmidt/add-markdown-rendering #15
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
name: Docker Build and Test | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'docker/**' | |
- 'frontend/**' | |
- 'backend/**' | |
- '.github/workflows/docker.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'docker/**' | |
- 'frontend/**' | |
- 'backend/**' | |
- '.github/workflows/docker.yml' | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build containers | |
run: docker compose -f docker/docker-compose.ci.yml build | |
- name: Start containers | |
run: docker compose -f docker/docker-compose.ci.yml up -d | |
- name: Wait for services to start | |
run: | | |
echo "Waiting for backend to be healthy..." | |
docker compose -f docker/docker-compose.ci.yml exec -T backend curl -s -f --retry 10 --retry-delay 5 http://localhost:8001/api/health | |
echo "Backend is healthy!" | |
echo "Waiting for frontend to be ready..." | |
docker compose -f docker/docker-compose.ci.yml exec -T frontend curl -s -f --retry 10 --retry-delay 5 http://localhost:8000/index.html | |
echo "Frontend is ready!" | |
- name: Test file conversion | |
run: | | |
docker compose -f docker/docker-compose.ci.yml exec -T backend curl -X POST -F "file=@/app/tests/fixtures/sample.docx" http://localhost:8001/api/v1/convert | |
- name: Stop containers | |
if: always() | |
run: docker compose -f docker/docker-compose.ci.yml down |