Apply suggestions from code review #69
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: pytorch | |
| on: [push] | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| pip install -e .[dev] | |
| - name: Pre-commit | |
| run: | | |
| pre-commit run --show-diff-on-failure --color=always | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.10", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Test | |
| env: | |
| NEPTUNE_API_TOKEN: ${{ secrets.E2E_NEPTUNE_API_TOKEN }} | |
| NEPTUNE_PROJECT: e2e-tests/e2e | |
| uses: ./.github/actions/e2e | |
| publish: | |
| needs: [pre-commit, test] | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.10" | |
| - name: Install build dependencies | |
| run: pip install poetry poetry-dynamic-versioning | |
| - name: Build package | |
| run: | | |
| poetry build | |
| - name: Publish package | |
| uses: pypa/[email protected] | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| packages_dir: dist |