You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2024/07/12 21:02:53 UTC

(incubator-ponymail-foal) branch master updated: Initial lint test

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 2edd406  Initial lint test
2edd406 is described below

commit 2edd40694eb42d5ca26ad452497c327731175ac6
Author: Sebb <se...@apache.org>
AuthorDate: Fri Jul 12 22:02:46 2024 +0100

    Initial lint test
---
 .github/workflows/linting.yml | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml
new file mode 100644
index 0000000..d8cc83d
--- /dev/null
+++ b/.github/workflows/linting.yml
@@ -0,0 +1,42 @@
+name: Linting and MyPy
+on:
+  push:
+    branch: master
+
+  workflow_dispatch:
+
+permissions:
+  contents: read
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      max-parallel: 1
+      matrix:
+        python-version: [3.12]
+    steps:
+    - uses: actions/checkout@master
+      with:
+        persist-credentials: false
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v4
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install dependencies
+      run: |
+        python -m pip install --upgrade pip
+        pip install -r tools/requirements.txt
+        pip install -r server/requirements.txt
+        pip install -r test/requirements.txt
+        pip install mypy
+        pip install types-requests
+        pip install pylint
+    - name: Type testing with mypy
+      run: |
+          mypy --cache-dir /tmp/ --install-types
+          mypy --cache-dir /tmp/ --ignore-missing-imports server tools
+    - name: Testing with pylint
+      run: |
+          pylint server tools