Skip to content

Commit

Permalink
ci(console): add Flake8 and Black to GitHub actions (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
bouassaba authored Nov 10, 2024
1 parent 2c4da80 commit c7f8aa3
Show file tree
Hide file tree
Showing 6 changed files with 152 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/check-on-pr-console.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ jobs:
with:
python-version: 3.12

- name: Lint using flake8
- name: Lint Using Flake8
uses: py-actions/flake8@v2
with:
flake8-version: 7.1.1
path: console
ignore: "F401,W291,W503"
max-line-length: "120"
exclude: ".git,Dockerfile"
args: --config=console/.flake8

- name: Lint Using Black
uses: psf/black@stable
with:
version: 24.10.0
src: console

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Wait until the following containers are running:
- `voltaserve-webdav`
- `voltaserve-language`
- `voltaserve-mosaic`
- `voltaserve-console`
- `voltaserve-ui`

> **Note**
Expand Down
4 changes: 4 additions & 0 deletions console/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
extend-ignore = F401,W291,W503
max-line-length = 120
extend-exclude = Dockerfile
2 changes: 1 addition & 1 deletion console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ POSTGRES_PORT=26257 poetry run python -m api.uvi --reload
Lint code:

```shell
flake8 . --extend-ignore F401,W291,W503 --max-line-length 120 --extend-exclude Dockerfile
flake8 .
```

Format code:
Expand Down
133 changes: 132 additions & 1 deletion console/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions console/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ typing-inspect = "0.9.0"
aiohttp = "3.9.5"
meilisearch = "0.31.5"
redis = "5.0.3"

[tool.poetry.group.dev.dependencies]
flake8 = "7.1.1"
black = "24.10.0"

0 comments on commit c7f8aa3

Please sign in to comment.