Refactor typing hints and improve string formatting #243
Workflow file for this run
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: Run pytest, ruff, and pyright | |
on: [push] | |
env: | |
PYTHON_VERSION: "3.11" | |
POETRY_VERSION: "1.8.3" | |
POETRY_URL: https://install.python-poetry.org | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
id: setup_python | |
- name: Cache Poetry cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry | |
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.POETRY_VERSION }} | |
- name: Cache Packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.local | |
key: poetry-local-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/*.yml') }} | |
- name: Install Poetry ${{ env.POETRY_VERSION }} | |
run: | | |
curl -sSL ${{ env.POETRY_URL }} | python - --version ${{ env.POETRY_VERSION }} | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install Dependencies | |
run: poetry install | |
- name: Run ruff format check | |
run: | | |
poetry run ruff format verified_cogen --check | |
poetry run ruff format tests --check | |
- name: Run ruff linter | |
run: poetry run ruff check verified_cogen tests | |
- name: Run pyright | |
run: poetry run pyright verified_cogen tests | |
- name: Run pytest | |
run: poetry run pytest |