39 lines
785 B
YAML
39 lines
785 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@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
|
|
# Installation instructions are from: https://python-poetry.org/docs/
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: |
|
|
pip install \
|
|
poetry
|
|
|
|
- name: Build
|
|
shell: bash
|
|
run: |
|
|
poetry install
|
|
poetry build
|
|
|
|
- name: Run ruff
|
|
shell: bash
|
|
run: |
|
|
poetry run ruff check --format=github .
|