From 14803cf12c02a0646a0b33bf8c0990d3c4309ee1 Mon Sep 17 00:00:00 2001 From: Grant Ramsay Date: Sat, 7 Sep 2024 12:46:52 +0100 Subject: [PATCH] add ruff and mypy github actions Signed-off-by: Grant Ramsay --- .github/workflows/linting.yml | 8 ++++++++ .github/workflows/mypy.yml | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/linting.yml create mode 100644 .github/workflows/mypy.yml diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..77d3096 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,8 @@ +name: Linting +on: [push, pull_request] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml new file mode 100644 index 0000000..7edc7e6 --- /dev/null +++ b/.github/workflows/mypy.yml @@ -0,0 +1,22 @@ +name: Type Checking + +on: [push, pull_request, workflow_dispatch] + +jobs: + mypy: + # uncomment the line before to disable this job if needed. + # if: false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Create MyPy Cache Directory + run: mkdir -p ${{ runner.workspace }}/.mypy_cache + - name: Mypy + uses: jpetrucciani/mypy-check@master + with: + path: "." + mypy_flags: + "--install-types --non-interactive --config-file pyproject.toml + --ignore-missing-imports --strict" + requirements_file: "requirements-dev.txt" + python_version: "3.9"