From 670c69ef31786569342078fe7044fd7f960636a7 Mon Sep 17 00:00:00 2001 From: Jon Stroop Date: Sat, 1 Mar 2025 23:12:30 -0500 Subject: [PATCH] add mypy to CI --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++++++++- README.md | 1 + 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78aa91e..8907b76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,4 +41,31 @@ jobs: files: ./coverage.xml # fail_ci_if_error: false name: codecov-umbrella - verbose: true \ No newline at end of file + verbose: true + + mypy: + name: mypy + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python 3.13 + uses: actions/setup-python@v4 + with: + python-version: "3.13" + + - name: Install PDM + run: | + python -m pip install --upgrade pip + pip install pdm + + - name: Install dependencies + run: | + pdm install -G:all + + - name: Verify type hints + run: | + pdm run mypy \ No newline at end of file diff --git a/README.md b/README.md index 7d92c7e..e2cb833 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![CI](https://github.com/jpstroop/fitbit-client-python/actions/workflows/ci.yml/badge.svg)](https://github.com/jpstroop/fitbit-client-python/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/jpstroop/fitbit-client-python/graph/badge.svg?token=DM0JD8VKZ4)](https://codecov.io/gh/jpstroop/fitbit-client-python) +[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/release/python-3130/) [![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)