| 1 |
--- |
| 2 |
name: Typing |
| 3 |
|
| 4 |
# yamllint disable-line rule:truthy |
| 5 |
on: |
| 6 |
push: |
| 7 |
pull_request: |
| 8 |
workflow_dispatch: |
| 9 |
|
| 10 |
env: |
| 11 |
DEFAULT_PYTHON: "3.12" |
| 12 |
|
| 13 |
jobs: |
| 14 |
ty: |
| 15 |
name: ty |
| 16 |
runs-on: ubuntu-latest |
| 17 |
steps: |
| 18 |
- name: โคต๏ธ Check out code from GitHub |
| 19 |
uses: actions/[email protected] |
| 20 |
- name: ๐ Set up Poetry |
| 21 |
run: pipx install poetry |
| 22 |
- name: ๐ Set up Python ${{ env.DEFAULT_PYTHON }} |
| 23 |
id: python |
| 24 |
uses: actions/[email protected] |
| 25 |
with: |
| 26 |
python-version: ${{ env.DEFAULT_PYTHON }} |
| 27 |
cache: "poetry" |
| 28 |
- name: ๐ Install workflow dependencies |
| 29 |
run: | |
| 30 |
poetry config virtualenvs.create true |
| 31 |
poetry config virtualenvs.in-project true |
| 32 |
- name: ๐ Install dependencies |
| 33 |
run: poetry install --no-interaction |
| 34 |
- name: ๐ Run ty |
| 35 |
run: poetry run ty check examples src tests |