build(ci): add ocpp-server code linter check
[e-mobility-charging-stations-simulator.git] / .github / workflows / ci.yml
index 9d6b5f136f7c53f951149bc3a27af5d9b7760976..b83544007ee5613addda76b3096c15afa0df752d 100644 (file)
@@ -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:
@@ -65,7 +88,7 @@ jobs:
         run: pnpm coverage
       - name: SonarCloud Scan
         if: ${{ needs.check-secrets.outputs.sonar-token-exists == 'true' && github.repository == 'sap/e-mobility-charging-stations-simulator' && matrix.os == 'ubuntu-latest' && matrix.node == '20.x' }}
-        uses: sonarsource/sonarcloud-github-action@v2.1.1
+        uses: sonarsource/sonarcloud-github-action@v2.2.0
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -116,7 +139,7 @@ jobs:
         run: pnpm coverage
       - name: SonarCloud Scan
         if: ${{ needs.check-secrets.outputs.sonar-token-exists == 'true' && github.repository == 'sap/e-mobility-charging-stations-simulator' && matrix.os == 'ubuntu-latest' && matrix.node == '20.x' }}
-        uses: sonarsource/sonarcloud-github-action@v2.1.1
+        uses: sonarsource/sonarcloud-github-action@v2.2.0
         with:
           projectBaseDir: ui/web
         env: