diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..3f17c7f --- /dev/null +++ b/.github/workflows/lint.yml @@ -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" diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 53f773a..cbf2a29 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -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 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8912a2f --- /dev/null +++ b/pyproject.toml @@ -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