| name: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt | |
| pip install build | |
| - name: Run tests | |
| run: pytest -q | |
| - name: Build package | |
| run: python -m build --sdist --wheel -o dist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |