This is an automated email from the ASF dual-hosted git repository. gstein pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/steve.git
commit a772d7e0aa19cd798b77d9b5f1de67bd86b3d343 Author: Greg Stein <[email protected]> AuthorDate: Tue Sep 30 17:39:13 2025 -0500 Get the type tests running on just v3. --- .github/workflows/type-tests.yml | 31 +++++++++++++++++++------------ v3/pyproject.toml | 4 ++++ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/type-tests.yml b/.github/workflows/type-tests.yml index cba0120..c87e536 100644 --- a/.github/workflows/type-tests.yml +++ b/.github/workflows/type-tests.yml @@ -3,19 +3,22 @@ name: Type Tests on: push: paths: + - 'v3/**/*.py' - '**/type-tests.yml' - - '**/*.py' - - 'requirements.txt' + - 'v3/pyproject.toml' pull_request: workflow_dispatch: +permissions: + contents: read jobs: build: runs-on: ubuntu-latest strategy: + fail-fast: false max-parallel: 1 matrix: python-version: [3.12] @@ -27,17 +30,21 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Cache Poetry dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pypoetry + key: ${{ runner.os }}-poetry-${{ hashFiles('v3/pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-poetry- + - name: Install Poetry + run: | + python -m pip install poetry - name: Install dependencies + working-directory: v3 # Set the working directory to v3 where pyproject.toml is located run: | - python -m pip install -r requirements.txt - python -m pip install mypy - python3 -m pip install types-PyYAML - python3 -m pip install types-requests + poetry install --with test,server - name: Type testing with mypy + working-directory: v3 # Ensure mypy runs in the correct directory run: | - # exclude duplicate module names under wsgi; also standalone.py print syntax error as they cause failure - # Need to re-enable var-annotated later - mypy --cache-dir /tmp/ --ignore-missing-imports \ - --exclude pysteve/www/wsgi --exclude pysteve/standalone.py \ - --disable-error-code var-annotated \ - pysteve + poetry run mypy --cache-dir /tmp/ --ignore-missing-imports . diff --git a/v3/pyproject.toml b/v3/pyproject.toml index b11691b..14dcd58 100644 --- a/v3/pyproject.toml +++ b/v3/pyproject.toml @@ -20,6 +20,10 @@ argon2-cffi = "^25.1.0" [tool.poetry.group.test.dependencies] coverage = "^7.10.6" pylint = "^3.3.8" +mypy = "^1.18.2" +types-PyYAML = "^6.0.12" +types-requests = "^2.32.4" +types-aiofiles = "^24.1.0" [tool.poetry.group.server.dependencies] asfquart = ">=0.1.12"
