Browse Source

Add Python linting to CI workflow

Jim Madge 3 years ago
parent
commit
26b350fec6
1 changed files with 22 additions and 0 deletions
  1. 22 0
      .github/workflows/lint.yaml

+ 22 - 0
.github/workflows/lint.yaml

@@ -44,3 +44,25 @@ jobs:
 
       - name: ShellCheck
         uses: ludeeus/action-shellcheck@1.1.0
+
+  python:
+    name: "Lint Python"
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+
+      - name: Setup Python
+        users: actions/setup-python@v2
+        with:
+          python-version: '3.10'
+
+      - name: Install dependencies
+        run: pip install flake8 mypy
+
+      - name: Flake8
+        run: flake8 $(find . -name '*.py')
+
+      - name: Mypy
+        run: mypy --strict $(find . -name '*.py')