Spaces:
Running
Running
| name: test | |
| on: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Install dependencies | |
| run: | | |
| eval `ssh-agent -s` | |
| ssh-add - <<< '${{ secrets.LYNXSCRIBE_DEPLOY_KEY }}' | |
| uv venv | |
| . .venv/bin/activate | |
| echo PATH=$PATH >> $GITHUB_ENV | |
| # Modify pyproject.toml to not install CUDA dependencies in CI. | |
| sed -i 's|https://pypi.org/simple|https://download.pytorch.org/whl/cpu|g' pyproject.toml | |
| sed -i 's|\[gpu\]||g' pyproject.toml | |
| uv sync | |
| - name: Run pre-commits | |
| run: | | |
| pre-commit run --all-files | |
| - name: Run Python unittests | |
| run: | | |
| pytest | |