47 lines
890 B
YAML
47 lines
890 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
test-and-lint:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
cache: "pip"
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
python -m pip install --upgrade pip
|
|
python -m pip install -e .
|
|
python -m pip install ruff
|
|
|
|
- name: Ruff (lint)
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
ruff check .
|
|
|
|
- name: Ruff (format check)
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
ruff format --check .
|
|
|
|
- name: Unit tests
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
make test
|