Use explicit combine #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Type checking | |
on: | |
push: | |
branches: | |
- main | |
- 'version-**' | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
type-checking: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
python-version: ['3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install ERT and dependencies | |
run: | | |
pip install . | |
- name: Install dependencies | |
# type checking requires protobuf stubs | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r types-requirements.txt | |
python -m pip install grpcio-tools | |
python -m grpc_tools.protoc -I src/_ert_com_protocol --mypy_out=src/_ert_com_protocol src/_ert_com_protocol/_schema.proto | |
- name: Run mypy | |
run: | | |
mypy --disallow-untyped-defs --ignore-missing-imports src/ert/run_models | |
- name: Run strict mypy | |
run: | | |
mypy src/ert --config-file .mypy-strict.ini |