| name: Python Installation Check | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build_and_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| lfs: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13.5' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run tests | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| TESTING: "true" | |
| run: | | |
| python -m pytest tests/ -v --cov=app --cov-report=term-missing | |
| deploy: | |
| needs: build_and_test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Push to Hub | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: git push --force https://KLEB38:$HF_TOKEN@huggingface.co/spaces/KLEB38/OC_P5 main | |