Add GitHub actions (#4) #11
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: Tests & type check | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
tests: | |
name: 'Unit tests' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
pipx install poetry | |
poetry install --no-interaction | |
- name: Run tests | |
run: | | |
poetry run pytest | |
- name: Run type check | |
run: | | |
poetry run black --check . | |