Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Lint

env:
DEFAULT_PYTHON_VERSION: "3.13"
DEFAULT_POETRY_VERSION: "2.1.0"

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry==${{ env.DEFAULT_POETRY_VERSION }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
cache: "poetry"
- name: Install dependencies
run: poetry install --with dev
- name: Lint
run: poetry run ruff check .

check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry==${{ env.DEFAULT_POETRY_VERSION }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
cache: "poetry"
- name: Install dependencies
run: poetry install --with dev
- name: Lint
run: poetry run ruff format --check .
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test

env:
DEFAULT_POETRY_VERSION: "2.1.0"

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.13"
- "3.12"
- "3.11"
- "3.10"
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry==${{ env.DEFAULT_POETRY_VERSION }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install dependencies
run: poetry install --with dev
- name: Test
run: poetry run pytest -vra
7 changes: 4 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
args: [ --unsafe ]
- id: end-of-file-fixer
- id: trailing-whitespace
args: [ --markdown-linebreak-ext=md ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.8
rev: v0.9.6
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.0.0
rev: v4.0.0
hooks:
- id: conventional-pre-commit
stages: [ commit-msg ]
Expand Down
Loading
Loading