-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from chrishavlin/enable_type_checking
add a type check workflow
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: type checking | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- yt_experiments/**/*.py | ||
- pyproject.toml | ||
- .github/workflows/type-checking.yaml | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: type check | ||
timeout-minutes: 60 | ||
|
||
concurrency: | ||
# auto-cancel any in-progress job *on the same branch* | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
# run with oldest supported python version | ||
# so that we always get compatible versions of | ||
# core dependencies at type-check time | ||
python-version: '3.10' | ||
|
||
- name: Build | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install "mypy==1.11.2" | ||
- run: python -m pip list | ||
|
||
- name: Run mypy | ||
run: mypy yt_experiments |
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