Migrate build and publish away from Poetry #10
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: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.10", "3.11", "3.12" ] | |
uv-version: [ "1.8.3" ] | |
os: [ ubuntu-22.04 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up uv ${{ matrix.uv-version }} | |
uses: yezz123/setup-uv@v4 | |
with: | |
uv-version: "0.3.5" | |
- name: Set up cache | |
uses: actions/cache@v3 | |
with: | |
path: ./.venv | |
key: venv-${{ hashFiles('uv.lock') }} | |
- name: Install dependencies | |
run: uv sync | |
- name: Check code style | |
run: uv run black --check . | |
- name: Check imports order | |
run: uv run isort --check . | |
- name: Check types | |
run: uv run mypy . | |
- name: Run unit tests | |
run: uv run pytest . |