Skip to content
name: Type Check Python Package
on:
push:
paths:
- 'sunholo/**'
- 'setup.py'
- 'tests/**'
pull_request:
paths:
- 'sunholo/**'
- 'setup.py'
- 'tests/**'
permissions:
contents: read
jobs:
type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy
- name: Install package
run: pip install .
- name: Run mypy type checking
continue-on-error: true # This allows the job to continue even if mypy finds type errors
run: |
mypy sunholo --show-error-codes
- name: Archive mypy results
if: failure()
run: |
mkdir -p mypy-results
mypy sunholo --show-error-codes > mypy-results/results.txt
- name: Upload mypy results
uses: actions/upload-artifact@v3
with:
name: mypy-results
path: mypy-results/results.txt