Use rye in CI #468
This file contains 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: Check code style | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-codestyle | |
cancel-in-progress: true | |
jobs: | |
style: | |
name: Check code style | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Install rye | |
uses: eifinger/setup-rye@v4 | |
with: | |
enable-cache: true | |
- name: Sync dependencies | |
run: rye sync | |
- name: Install pre-commit | |
run: | | |
rye run -- pre-commit install | |
- name: Run pre-commit | |
run: | | |
rye run -- pre-commit run --all-files --color always --verbose --show-diff-on-failure |