From: Jérôme Benoit Date: Wed, 12 Jun 2024 18:53:41 +0000 (+0200) Subject: build(ci): add ocpp-server code linter check X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=ffccbf2287d74bfde06179427a1eabad986d1235;p=e-mobility-charging-stations-simulator.git build(ci): add ocpp-server code linter check Signed-off-by: Jérôme Benoit --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f48baf21..b8354400 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,29 @@ jobs: else echo "defined=false" >> $GITHUB_OUTPUT; fi + build-ocpp-server: + strategy: + matrix: + python: + - 3.12 + runs-on: ubuntu-latest + defaults: + run: + working-directory: tests/ocpp-server + steps: + - uses: actions/checkout@v4 + - name: Setup Python ${{ matrix.python }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - name: Install Poetry + run: | + python -m pip install --upgrade pip + pip install poetry + - name: Install Dependencies + run: poetry install + - name: Lint + run: poetry run task lint build-simulator: needs: [check-secrets] strategy: diff --git a/tests/ocpp-server/pyproject.toml b/tests/ocpp-server/pyproject.toml index 88c09f88..d0c6d4e4 100644 --- a/tests/ocpp-server/pyproject.toml +++ b/tests/ocpp-server/pyproject.toml @@ -18,7 +18,7 @@ flake8 = "^7" [tool.taskipy.tasks] format = "black . && isort ." -lint = "flake8 ." +lint = "black --check --diff . && isort --check --diff . && flake8 ." [tool.isort] profile = 'black'