-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb85703
commit 4f9eb62
Showing
3 changed files
with
93 additions
and
36 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
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,57 @@ | ||
name: Type Check | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/**' | ||
- 'tests/**' | ||
- '.github/workflows/typecheck.yml' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/**' | ||
- 'tests/**' | ||
- '.github/workflows/typecheck.yml' | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
mypy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install pipx | ||
run: python -m pip install pipx | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Setup a local virtual environment | ||
run: | | ||
poetry config virtualenvs.create true --local | ||
poetry config virtualenvs.in-project true --local | ||
- uses: actions/cache@v4 | ||
name: Define a cache for the venv based on the dependencies lock file | ||
with: | ||
key: ubuntu-latest-3.12-${{ hashFiles('poetry.lock') }} | ||
path: ./.venv | ||
|
||
- name: Install the project dependencies | ||
run: poetry install --all-extras | ||
|
||
- name: Run mypy | ||
run: poetry run mypy . |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.