Skip to content

Merge pull request #228 from r1chardj0n3s/dependabot/github_actions/a… #148

Merge pull request #228 from r1chardj0n3s/dependabot/github_actions/a…

Merge pull request #228 from r1chardj0n3s/dependabot/github_actions/a… #148

Workflow file for this run

name: parse
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
run-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: |
pip install -U pip setuptools
pip install -r tests/requirements.txt --editable .
pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
tests-37:
name: Python 3.7 on ubuntu-22.04
runs-on: ubuntu-22.04
container:
image: python:3.7
steps:
- uses: actions/checkout@v6
- name: Run tests
run: |
pip install -U pip setuptools
pip install -r tests/requirements.txt
python -m pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
tests-27:
name: Python 2.7 on ubuntu-22.04
runs-on: ubuntu-22.04
container:
image: python:2.7-buster
steps:
- uses: actions/checkout@v6
- name: Run tests
run: |
pip install -U pip setuptools
pip install -r tests/requirements.txt
python -m pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
type-stubs:
name: Check stub file with stubtest and mypy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install parse and mypy
run: |
pip install . mypy
# Run mypy to type-check the package implementation itself
# --check-untyped-defs ensures unannotated functions are checked
# --disallow-any-generics prevents missing generic parameters
- name: Check types with mypy
run: |
python -m mypy --check-untyped-defs --disallow-any-generics parse
# Run mypy's stubtest to verify that the .pyi stubs
# accurately describe the runtime behavior of the package
- name: Run stubtest
run: |
python -m mypy.stubtest parse
# Run mypy to type-check the test files themselves
- name: Check test types with mypy
run: |
python -m mypy tests/check_typing.py