π·πΌ Add a basic CI workflow #1
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 | |
env: | |
FORCE_COLOR: 1 | |
jobs: | |
test: | |
name: π§ͺ Test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: | |
- '3.12' | |
- '3.11' | |
- '3.10' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: pdm install -G test --frozen-lockfile | |
- name: Run pytest | |
run: pdm run pytest -v | |
lint: | |
name: π§ Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: pdm install -G lint --frozen-lockfile | |
- name: Lint with ruff | |
run: | | |
pdm run ruff check . | |
pdm run ruff format --check . | |
- name: Type check with mypy | |
run: pdm run mypy |