chore(deps): update pre-commit hook charliermarsh/ruff-pre-commit to … #3113
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 | |
| tags: | |
| - v* | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| manylinux: "2_17" | |
| - target: x86_64-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| manylinux: "2_28" | |
| # - target: x86_64-unknown-linux-gnu | |
| # runner: ubuntu-24.04 | |
| # manylinux: "2_34" | |
| - target: x86_64-unknown-linux-musl | |
| runner: ubuntu-24.04 | |
| manylinux: musllinux_1_2 | |
| - target: i686-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| manylinux: "2_17" | |
| - target: i686-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| manylinux: "2_28" | |
| - target: i686-unknown-linux-musl | |
| runner: ubuntu-24.04 | |
| manylinux: musllinux_1_2 | |
| - target: aarch64-unknown-linux-gnu | |
| runner: ubuntu-24.04-arm | |
| manylinux: "2_17" | |
| - target: aarch64-unknown-linux-gnu | |
| runner: ubuntu-24.04-arm | |
| manylinux: "2_28" | |
| # - target: aarch64-unknown-linux-gnu | |
| # runner: ubuntu-24.04-arm | |
| # manylinux: "2_34" | |
| - target: aarch64-unknown-linux-musl | |
| runner: ubuntu-24.04 | |
| manylinux: musllinux_1_2 | |
| # - target: arm-unknown-linux-musleabihf | |
| # runner: ubuntu-24.04 | |
| # manylinux: musllinux_1_2 | |
| - target: armv7-unknown-linux-gnueabihf | |
| runner: ubuntu-24.04 | |
| manylinux: "2_17" | |
| - target: armv7-unknown-linux-gnueabihf | |
| runner: ubuntu-24.04 | |
| manylinux: "2_28" | |
| - target: armv7-unknown-linux-musleabihf | |
| runner: ubuntu-24.04 | |
| manylinux: musllinux_1_2 | |
| - target: powerpc64-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| manylinux: "2_17" | |
| - target: powerpc64le-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| manylinux: "2_17" | |
| - target: powerpc64le-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| manylinux: "2_28" | |
| - target: powerpc64le-unknown-linux-musl | |
| runner: ubuntu-24.04 | |
| manylinux: musllinux_1_2 | |
| - target: s390x-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| manylinux: "2_17" | |
| - target: s390x-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| manylinux: "2_28" | |
| - target: riscv64gc-unknown-linux-gnu | |
| runner: ubuntu-24.04 | |
| manylinux: "2_31" | |
| - target: riscv64gc-unknown-linux-musl | |
| runner: ubuntu-24.04 | |
| manylinux: musllinux_1_2 | |
| # - target: loongarch64-unknown-linux-gnu | |
| # runner: ubuntu-24.04 | |
| # manylinux: "2_36" | |
| # - target: loongarch64-unknown-linux-musl | |
| # runner: ubuntu-24.04 | |
| # manylinux: musllinux_1_2 | |
| - target: x86_64-apple-darwin | |
| runner: macos-26-intel | |
| setup-python-versions: | | |
| 3.10 | |
| 3.11 | |
| 3.12 | |
| 3.13 | |
| 3.14t | |
| 3.15 | |
| 3.15t | |
| pypy3.11 | |
| 3.14 | |
| - target: aarch64-apple-darwin | |
| runner: macos-26 | |
| setup-python-versions: | | |
| 3.10 | |
| 3.11 | |
| 3.12 | |
| 3.13 | |
| 3.14t | |
| 3.15 | |
| 3.15t | |
| pypy3.11 | |
| 3.14 | |
| - target: x86_64-pc-windows-msvc | |
| runner: windows-2025 | |
| setup-python-architecture: x64 | |
| setup-python-versions: | | |
| 3.10 | |
| 3.11 | |
| 3.12 | |
| 3.13 | |
| 3.15 | |
| 3.14 | |
| build-python-versions: 3.10 3.11 3.12 3.13 3.14 3.15 | |
| - target: x86_64-pc-windows-msvc | |
| runner: windows-2025 | |
| setup-python-architecture: x64 | |
| setup-python-versions: | | |
| 3.15t | |
| 3.14t | |
| build-python-versions: 3.14t 3.15t | |
| artifact_suffix: "-freethreaded" | |
| - target: x86_64-pc-windows-msvc | |
| runner: windows-2025 | |
| setup-python-architecture: x64 | |
| setup-python-versions: | | |
| pypy3.11 | |
| 3.14 | |
| build-python-versions: pypy3.11 | |
| artifact_suffix: "-pypy" | |
| - target: i686-pc-windows-msvc | |
| runner: windows-2025 | |
| setup-python-architecture: x86 | |
| setup-python-versions: | | |
| 3.10 | |
| 3.11 | |
| 3.12 | |
| 3.13 | |
| 3.15 | |
| 3.14 | |
| build-python-versions: 3.10 3.11 3.12 3.13 3.14 3.15 | |
| - target: i686-pc-windows-msvc | |
| runner: windows-2025 | |
| setup-python-architecture: x86 | |
| setup-python-versions: | | |
| 3.15t | |
| 3.14t | |
| build-python-versions: 3.14t 3.15t | |
| artifact_suffix: "-freethreaded" | |
| - target: aarch64-pc-windows-msvc | |
| runner: windows-11-arm | |
| setup-python-architecture: arm64 | |
| setup-python-versions: | | |
| 3.11 | |
| 3.12 | |
| 3.13 | |
| 3.15 | |
| 3.14 | |
| build-python-versions: 3.11 3.12 3.13 3.14 3.15 | |
| - target: aarch64-pc-windows-msvc | |
| runner: windows-11-arm | |
| setup-python-architecture: arm64 | |
| setup-python-versions: | | |
| 3.15t | |
| 3.14t | |
| build-python-versions: 3.14t 3.15t | |
| artifact_suffix: "-freethreaded" | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - if: "${{ matrix.setup-python-versions }}" | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 | |
| with: | |
| python-version: "${{ matrix.setup-python-versions }}" | |
| allow-prereleases: true | |
| architecture: "${{ matrix.setup-python-architecture || '' }}" | |
| check-latest: true | |
| - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1 | |
| with: | |
| args: --compatibility pypi --interpreter '${{ matrix.build-python-versions || '3.10 3.11 3.12 3.13 3.14 3.14t 3.15 3.15t pypy3.11' }}' --out dist --release | |
| target: ${{ matrix.target }} | |
| manylinux: ${{ matrix.manylinux || 'auto' }} | |
| rust-toolchain: beta | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: | | |
| ${{ format('wheels-{0}-{1}{2}', matrix.target, matrix.manylinux || 'auto', matrix.artifact_suffix || '') }} | |
| path: dist | |
| check: | |
| if: ${{ always() && github.event_name == 'pull_request' }} | |
| needs: | |
| - build | |
| - clippy | |
| - docs-build | |
| - pre-commit | |
| - pytest | |
| - rustfmt | |
| - sdist | |
| - udeps | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} | |
| clippy: | |
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 | |
| with: | |
| toolchain: beta | |
| target: > | |
| x86_64-unknown-linux-gnu, | |
| x86_64-unknown-linux-musl, | |
| i686-unknown-linux-gnu, | |
| i686-unknown-linux-musl, | |
| aarch64-unknown-linux-gnu, | |
| aarch64-unknown-linux-musl, | |
| armv7-unknown-linux-gnueabihf, | |
| armv7-unknown-linux-musleabihf, | |
| powerpc64-unknown-linux-gnu, | |
| powerpc64le-unknown-linux-gnu, | |
| powerpc64le-unknown-linux-musl, | |
| s390x-unknown-linux-gnu, | |
| riscv64gc-unknown-linux-gnu, | |
| riscv64gc-unknown-linux-musl, | |
| x86_64-apple-darwin, | |
| aarch64-apple-darwin, | |
| x86_64-pc-windows-msvc, | |
| i686-pc-windows-msvc, | |
| aarch64-pc-windows-msvc | |
| components: clippy | |
| - run: cargo +beta clippy --all-targets -- -Dwarnings | |
| docs-build: | |
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| needs: | |
| - build | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| python-version: "3.14" | |
| enable-cache: true | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: wheels-x86_64-unknown-linux-gnu-2_28 | |
| path: dist | |
| - run: uv sync --group docs --no-group dev --no-install-project --locked | |
| - run: uv pip install --find-links dist pyromark | |
| - run: uv run --no-sync zensical build | |
| - if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | |
| uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5 | |
| with: | |
| path: site | |
| docs-deploy: | |
| if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | |
| needs: docs-build | |
| runs-on: ubuntu-24.04 | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5 | |
| pre-commit: | |
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| python-version: "3.14" | |
| enable-cache: false | |
| - run: uvx --no-cache prek run --all-files --show-diff-on-failure | |
| env: | |
| RUFF_OUTPUT_FORMAT: github | |
| pytest: | |
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| needs: | |
| - build | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| python-version: | |
| - "3.10" | |
| - "3.15" | |
| - "3.15t" | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| with: | |
| name: wheels-x86_64-unknown-linux-gnu-2_28 | |
| path: dist | |
| - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - run: uv sync --no-install-project --locked | |
| - run: uv pip install --find-links dist pyromark | |
| - run: uv run --no-sync pytest | |
| release: | |
| runs-on: ubuntu-24.04 | |
| if: ${{ github.repository_owner == 'monosans' && startsWith(github.ref, 'refs/tags/') }} | |
| needs: | |
| - build | |
| - sdist | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 | |
| - uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 | |
| with: | |
| python-version: "3.14" | |
| enable-cache: false | |
| - run: uv publish --trusted-publishing always --no-cache 'wheels-*/*' | |
| rustfmt: | |
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - run: cargo +nightly fmt --check | |
| sdist: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| rust-toolchain: beta | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: wheels-sdist | |
| path: dist | |
| udeps: | |
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1 | |
| with: | |
| toolchain: nightly | |
| cache-key: x86_64-unknown-linux-gnu | |
| - run: cargo +nightly install --locked cargo-udeps | |
| - run: cargo +nightly udeps |