Skip to content

Commit

Permalink
Add ruff automated test
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrjurkiewicz committed Aug 26, 2024
1 parent dfbd20a commit 951e6ce
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,28 @@ on:
branches: ['master']

jobs:
build:

ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install pip and ruff
run: |
python -m pip install --upgrade pip
pip install ruff==0.6.2
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run ruff
run: ruff check --output-format=github flow_models

build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13.0-rc.1', '3.x', 'pypy3.10']

steps:
- uses: actions/checkout@v3
- name: Checkout submodule
Expand Down
67 changes: 67 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
line-length = 220
target-version = "py312"

[lint]
select = ["ALL"]

ignore = [
"ANN001",
"ANN002",
"ANN003",
"ANN201",
"ANN202",
"ANN204",
"ARG005",
"B007",
"B028",
"BLE001",
"C901",
"D100",
"D101",
"D102",
"D103",
"D104",
"D105",
"D107",
"D202",
"D212",
"D413",
"E501",
"EM101",
"EM102",
"ERA001",
"EXE001",
"FBT002",
"FIX002",
"I001",
"ICN001",
"PD010",
"PD901",
"PERF401",
"PERF403",
"PLR09",
"PLR2004",
"PLR5501",
"PLW2901",
"PTH123",
"Q000",
"RET504",
"RET505",
"RET506",
"RUF012",
"S101",
"S301",
"S307",
"S311",
"S324",
"S603",
"S607",
"SIM108",
"SIM115",
"SLF001",
"TD002",
"TD003",
"T201",
"TRY003",
"TRY004"
]

0 comments on commit 951e6ce

Please sign in to comment.