[Release] v3.10.1 #1754
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| OMP_NUM_THREADS: 8 | |
| MKL_NUM_THREADS: 8 | |
| PYTHONDONTWRITEBYTECODE: 1 | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: 3.12 | |
| enable-cache: true | |
| prune-cache: false | |
| - name: Install dependencies | |
| run: uv sync --frozen --no-editable | |
| - name: Run lint | |
| run: | | |
| uv run ruff check pytorch_optimizer examples tests scripts hubconf.py | |
| uv run black -S -l 119 --check pytorch_optimizer examples tests scripts hubconf.py | |
| type_check: | |
| name: Static Type Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: 3.12 | |
| enable-cache: true | |
| prune-cache: false | |
| - name: Install dependencies | |
| run: uv sync --frozen --no-editable | |
| - uses: jakebailey/pyright-action@v2 | |
| with: | |
| version: 1.1.408 | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| prune-cache: false | |
| - name: Install dependencies | |
| run: uv sync --frozen --no-editable | |
| - name: Check test | |
| run: uv run --frozen pytest | |
| - name: Upload coverage | |
| if: success() | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./ | |
| files: ./coverage.xml | |
| env_vars: OS,PYTHON | |
| flags: ${{ matrix.python-version }} | |
| fail_ci_if_error: true | |
| verbose: false | |
| ci-summary: | |
| if: always() | |
| needs: [lint, type_check, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check results | |
| if: needs.lint.result == 'failure' || needs.type_check.result == 'failure' || needs.test.result == 'failure' | |
| run: exit 1 | |
| - name: Report Summary | |
| run: echo "✅ Lint and tests completed for all targets" |