40 lines
811 B
YAML
40 lines
811 B
YAML
name: ruff
|
|
on:
|
|
push:
|
|
branches: main
|
|
paths:
|
|
- '**.py'
|
|
- .github/workflows/ruff.yml
|
|
- 'pyproject.toml'
|
|
pull_request:
|
|
paths:
|
|
- '**.py'
|
|
- .github/workflows/ruff.yml
|
|
- 'pyproject.toml'
|
|
jobs:
|
|
ruff:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Install Poetry
|
|
run: |
|
|
curl -sSL https://install.python-poetry.org | python3 -
|
|
|
|
- name: Build
|
|
shell: bash
|
|
run: |
|
|
poetry install
|
|
poetry build
|
|
|
|
- name: Run ruff
|
|
shell: bash
|
|
run: |
|
|
poetry run ruff check --output-format=github .
|
|
poetry run ruff format --check
|