CI fixes #8
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: Lint, Type Check, and Test | |
on: [push, pull_request] | |
jobs: | |
qol: | |
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 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
- name: Lint | |
run: | | |
pip install ruff | |
ruff check . | |
- name: Type check | |
run: | | |
pip install pyright | |
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 | |