Skip to content

Commit 7f4b682

Browse files
committed
Separate GitHub Actions into 3 separate workflows: Quality, Test, and TypeCheck
Changes include: - Updated ruff to 0.15.8 in .pre-commit-config.yaml - Added default entry for next version to CHANGELOG with info on changes since last release - New quality.yml workflow for running pre-commit checks using prek (ruff, typos, and some generic whitespace checks) - ruff and typos checks moved here - Modified tests.yaml to run on all 3 supported oses: Windows and MacOs in addition to previous testing on Linux (Ubuntu) - New typecheck.yml - moved mypy type checking here
1 parent 940af53 commit 7f4b682

5 files changed

Lines changed: 101 additions & 24 deletions

File tree

.github/workflows/quality.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# For documentation on GitHub Actions Workflows, see:
2+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
3+
# This workflow runs the pre-commit checks using prek on pull requests and pushes to the main branch.
4+
# Specifically it runs ruff autoformatting and linting, typos for spellchecking, and other
5+
# pre-commit hooks defined in .pre-commit-config.yaml.
6+
name: Quality
7+
on:
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
push:
11+
branches: [main]
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
quality:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Check out
21+
uses: actions/checkout@v6.0.2
22+
with:
23+
fetch-depth: 0 # Needed for setuptools_scm to work correctly
24+
25+
- uses: actions/cache@v5
26+
with:
27+
path: ~/.cache/pre-commit
28+
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
29+
- name: Install uv and set the python version
30+
uses: astral-sh/setup-uv@v7
31+
with:
32+
python-version: "3.14"
33+
- name: Install the project
34+
run: uv sync --group quality
35+
- name: Run prek
36+
run: uv run prek run -a --show-diff-on-failure

.github/workflows/test.yaml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,37 @@
1-
name: test
1+
# This workflow runs pytest unit tests and code coverage reporting on push and pull requests to the main branch.
2+
# It tests against multiple Python versions and operating systemsto ensure compatibility. The workflow uses Codecov
3+
# for coverage reporting, and the results are uploaded to Codecov using a secret token.
4+
name: Test
25

36
on:
4-
push: # any branch
5-
pull_request:
7+
pull_request: # any branch
8+
types: [opened, synchronize, reopened]
9+
push:
610
branches: [main]
711

812
env:
913
FORCE_COLOR: 1
1014

1115
jobs:
12-
test-ubuntu:
13-
runs-on: ubuntu-latest
16+
test:
1417
strategy:
1518
fail-fast: false
1619
matrix:
17-
python-version:
18-
["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
19-
20+
os: [ubuntu-latest, macos-latest, windows-latest]
21+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15-dev"]
22+
runs-on: ${{ matrix.os }}
2023
steps:
2124
- uses: actions/checkout@v6.0.2
2225
- uses: astral-sh/setup-uv@v7
2326
with:
2427
python-version: ${{ matrix.python-version }}
25-
- name: Code formatting
26-
if: ${{ matrix.python-version == '3.14' }}
27-
run: |
28-
uv run ruff check .
29-
uv run ruff format --check .
30-
- name: Typos
31-
if: ${{ matrix.python-version == '3.14' }}
32-
run: |
33-
uv run typos .
3428
- name: Unit test
3529
run: |
3630
uv run coverage run -m pytest tests/
37-
- name: Type Checking
38-
run: |
39-
uv run mypy --strict src/ --platform win32
40-
uv run mypy --strict src/ --platform linux
41-
uv run mypy --strict src/ --platform darwin
4231
- name: Run codecov
4332
run: |
4433
uv run codecov
4534
- name: Upload coverage to Codecov
46-
uses: codecov/codecov-action@v5
35+
uses: codecov/codecov-action@v6
4736
env:
4837
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/typecheck.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# For documentation on GitHub Actions Workflows, see:
2+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
3+
# This workflow runs mypy type checking on push and pull requests to the main branch.
4+
# It tests against multiple Python versions to ensure compatibility.
5+
name: TypeCheck
6+
on:
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
push:
10+
branches: [main]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
type-check:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
21+
fail-fast: false
22+
defaults:
23+
run:
24+
shell: bash
25+
steps:
26+
- name: Check out
27+
uses: actions/checkout@v6.0.2
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Install uv and set the python version
32+
uses: astral-sh/setup-uv@v7
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Type Checking
37+
run: |
38+
uv run mypy --strict src/ --platform win32
39+
uv run mypy --strict src/ --platform linux
40+
uv run mypy --strict src/ --platform darwin

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
- id: trailing-whitespace
1414

1515
- repo: https://github.com/astral-sh/ruff-pre-commit
16-
rev: "v0.15.6"
16+
rev: "v0.15.8"
1717
hooks:
1818
- id: ruff-format
1919
args: [--config=pyproject.toml]

CHANGELOG

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
CHANGELOG
22
=========
33

4+
3.0.53: 2026-0-TBD
5+
------------------
6+
7+
New features:
8+
- Lazy loading of `__version__`
9+
10+
Fixes:
11+
- Fix get_word_before_cursor behavior
12+
- Fix various typing issues
13+
- Set missing minimal requirement on `wcwidth`
14+
- Fix vt100 6x6x6 color cube range and missing grayscale shades (232, 254-255)
15+
416
3.0.52: 2025-08-27
517
------------------
618

0 commit comments

Comments
 (0)