Skip to content

Commit

Permalink
type check via poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
krypticmouse committed May 16, 2024
1 parent e4eb879 commit cd8c878
Showing 1 changed file with 7 additions and 38 deletions.
45 changes: 7 additions & 38 deletions .github/workflows/qol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.1.13
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up cache
uses: actions/cache@v2
id: cached-poetry-dependencies
- uses: actions/setup-python@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
python-version: '3.11'
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: |
pip install poetry
poetry install
- name: Lint
run: |
pip install ruff
ruff check .
- name: Type check
run: |
pip install pyright
pyright
poetry run pyright
- name: Test
run: |
pip install pytest
pytest
- run: pip install ruff
- run: ruff check .

type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: pip install pyright
- run: pyright

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: pip install pytest
- run: pytest

PYTHONPATH=$PYTHONPATH:. poetry run pytype

0 comments on commit cd8c878

Please sign in to comment.