chg: use prek instead of pre-commit (#46) #3
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: | |
| workflow_dispatch: | |
| push: | |
| pull_request: | |
| permissions: {} | |
| jobs: | |
| prek: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout Code Repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| - name: Install deptry | |
| run: uv tool install deptry | |
| - name: Install prek | |
| run: uv tool install prek | |
| - name: Run prek | |
| run: prek run --all-files --show-diff-on-failure | |
| - name: Run prek (extra) | |
| run: prek run --all-files --show-diff-on-failure --config prek-extra.toml |