Feature frontend exam form #1003
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: Test Docker Compose | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| jobs: | |
| test-docker-compose: | |
| runs-on: ubuntu-latest | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_REGION: ${{ secrets.AWS_REGION }} | |
| S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Create .env for Docker Compose | |
| run: | | |
| echo "POSTGRES_USER=$POSTGRES_USER" >> backend/.env | |
| echo "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" >> backend/.env | |
| echo "POSTGRES_DB=$POSTGRES_DB" >> backend/.env | |
| echo "POSTGRES_PORT=$POSTGRES_PORT" >> backend/.env | |
| echo "AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID" >> backend/.env | |
| echo "AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY" >> backend/.env | |
| echo "AWS_REGION=$AWS_REGION" >> backend/.env | |
| echo "S3_BUCKET=$S3_BUCKET" >> backend/.env | |
| echo "STACK_NAME=study-assistant" >> backend/.env | |
| - run: docker compose build | |
| - run: docker compose down -v --remove-orphans | |
| - run: docker compose up -d --wait backend adminer frontend | |
| - name: Test backend is up | |
| run: curl http://localhost:8000/api/v1/utils/health-check | |
| - name: Test frontend is up | |
| run: curl http://localhost:5173 | |
| - run: docker compose down -v --remove-orphans |