Bump pre-commit from 4.2.0 to 4.5.1 #103
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: Testing | |
| # yamllint disable-line rule:truthy | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| DEFAULT_PYTHON: "3.12" | |
| jobs: | |
| pytest: | |
| name: Py${{ matrix.python-version }} - CVXPY ${{ matrix.cvxpy-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: "3.12" | |
| cvxpy-version: "1.5.4" | |
| - python-version: "3.12" | |
| cvxpy-version: "1.6.7" | |
| - python-version: "3.12" | |
| cvxpy-version: "latest" | |
| - python-version: "3.13" | |
| cvxpy-version: "latest" | |
| steps: | |
| - name: ⤵️ Check out code from GitHub | |
| uses: actions/checkout@v4.2.2 | |
| - name: 🏗 Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| python-version: ${{ matrix.python-version }} | |
| - name: 🏗 Install dependencies | |
| run: uv sync --group dev | |
| - name: 🏗 Install specific CVXPY version | |
| run: | | |
| if [ "${{ matrix.cvxpy-version }}" = "latest" ]; then | |
| uv add --upgrade cvxpy | |
| else | |
| uv add "cvxpy==${{ matrix.cvxpy-version }}" | |
| fi | |
| - name: 🚀 Run pytest | |
| run: uv run pytest --cov src/dccp tests | |
| - name: ⬆️ Upload coverage artifact | |
| uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: py${{ matrix.python-version }}-cvxpy${{ matrix.cvxpy-version }} | |
| include-hidden-files: true | |
| path: .coverage | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: pytest | |
| steps: | |
| - name: ⤵️ Check out code from GitHub | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: ⬇️ Download coverage data | |
| uses: actions/download-artifact@v4.3.0 | |
| - name: 🏗 Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| python-version: ${{ env.DEFAULT_PYTHON }} | |
| - name: 🏗 Install dependencies | |
| run: uv sync | |
| - name: 🚀 Process coverage results | |
| run: | | |
| uv run coverage combine py*/.coverage* | |
| uv run coverage xml -i | |
| - name: 🚀 Upload coverage report | |
| uses: codecov/codecov-action@v5.4.3 |