Skip to content

Commit

Permalink
Feat(tests) add lint in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Narcisi committed Aug 23, 2024
1 parent 2facf8e commit 4ffcad2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lint

on: [push, pull_request]

jobs:
backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Backend code formatting check (Black)
uses: psf/black@stable
with:
src: "./src"
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
pytest -v --cov --cov-report xml
env:
GEONATURE_CONFIG_FILE: dependencies/GeoNature/config/test_config.toml
GEONATURE_SETTINGS: gn_module_import.test_config
GEONATURE_SETTINGS: mtd_sync.test_config
- name: Upload coverage to Codecov
if: ${{ matrix.debian-version == '12' }}
uses: codecov/codecov-action@v2
Expand Down
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [
"src",
]

[tool.coverage.run]
source = [
"mtd_sync",
]
omit = [
"*/tests/*",
"*/migrations/*",
]

[tool.black]
line-length = 99

0 comments on commit 4ffcad2

Please sign in to comment.