| name: CI | |
| on: | |
| push: | |
| branches: '**' | |
| pull_request: | |
| branches: '**' | |
| jobs: | |
| backend-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| if [ -f Backend/requirements.txt ]; then pip install -r Backend/requirements.txt; fi | |
| - name: Run tests | |
| run: | | |
| python -m pytest api/ -v --ignore=api/test_supabase_auth.py | |
| docker-build: | |
| runs-on: ubuntu-latest | |
| needs: [backend-tests] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build backend image | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| file: Backend.Dockerfile | |
| push: false | |
| tags: backend:local | |