chore: allow any version of ruff #42
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: Python | |
on: | |
push: | |
branches: ["master", "ci-test"] | |
paths: ["**/*.py", "pyproject.toml", "pdm.lock"] | |
pull_request: | |
branches: ["master", "ci-test"] | |
paths: ["**/*.py", "pyproject.toml", "pdm.lock"] | |
jobs: | |
pyright: | |
name: Pyright | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# CI: LATER: activate pdm venv for 3rd party dependencies | |
# | not required right now but discord.py converters are planned | |
- uses: jakebailey/pyright-action@v2 | |
ruff: | |
name: Ruff | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: "3.10" | |
cache: true | |
- name: Install deps | |
run: pdm sync | |
- name: Activate venv | |
run: echo "$(pdm venv --path in-project)/bin" >> $GITHUB_PATH | |
- name: Check | |
run: ruff check --output-format github | |
- name: Fix | |
run: ruff check --extend-select I --fix-only | |
- name: Format | |
run: ruff format | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "style: ruff" |