From 0f49a3d04355a5d6d13810ee033b790d030204fd Mon Sep 17 00:00:00 2001 From: Antti Kaihola <13725+akaihola@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:22:58 +0300 Subject: [PATCH] chore: add GitHub workflow to run Mypy --- .github/workflows/lint.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000000..e2ad79c0281 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,44 @@ +--- +name: Linting + +on: + push: + paths-ignore: + - 'aider/website/**' + - README.md + - HISTORY.md + branches: + - main + pull_request: + paths-ignore: + - 'aider/website/**' + - README.md + branches: + - main + +jobs: + mypy: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install mypy + pip install '.[dev]' + + - name: Run Mypy + uses: wearerequired/lint-action@v2.3.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + mypy: true + mypy_args: "." + continue_on_error: false