add msgspec to dependencies for tests #3
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 | |
- pull_request | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: pip | |
- name: Install ruff | |
run: pip install ruff | |
- name: Run format | |
run: ruff format --diff | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: pip | |
- name: Install ruff | |
run: pip install ruff | |
- name: Run lint | |
run: ruff check | |
test: | |
needs: | |
- format | |
- lint | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
python-version: | |
- "3.11" | |
- "3.12" | |
steps: | |
- name: Get code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: Install poetry | |
run: pip install poetry | |
- name: Install dependencies | |
run: poetry install --with test --all-extras | |
- name: Run tests | |
run: poetry run pytest --random-order --count=3 |