Spaces:
Sleeping

dn
push to notebooks
5ebd6cf
Raw History Blame Contribute Delete
1.05 kB
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
with:
enable-cache: true
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --all-extras --dev
- name: Lint
run: uv run ruff check .
- name: Run tests
run: uv run pytest tests
deploy-hf:
needs: test
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Push to HF Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git push -f https://dom-dom:$HF_TOKEN@huggingface.co/spaces/missing-metro/notebooks main