Skip to content

Commit a1a1fe2

Browse files
committed
ci: consolidate jobs and drop Python 3.10 support
Merge separate lint, format, and typecheck jobs into single check job that runs `make check`. Streamline all job steps to use compact syntax. Update minimum Python version from 3.10 to 3.11 in project metadata, ruff configuration, ty configuration, and CI test matrix. Remove redundant step names and verbose action configurations throughout the workflow file.
1 parent f6eb115 commit a1a1fe2

2 files changed

Lines changed: 21 additions & 87 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -11,112 +11,46 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
lint:
15-
name: Lint & Format
14+
check:
15+
name: Lint & Typecheck
1616
runs-on: ubuntu-latest
1717
steps:
1818
- uses: actions/checkout@v4
19-
20-
- name: Install uv
21-
uses: astral-sh/setup-uv@v5
22-
with:
23-
version: "latest"
24-
25-
- name: Set up Python
26-
run: uv python install 3.12
27-
28-
- name: Install dependencies
29-
run: uv sync --extra dev
30-
31-
- name: Check formatting
32-
run: uv run ruff format --check .
33-
34-
- name: Lint
35-
run: uv run ruff check .
36-
37-
typecheck:
38-
name: Type Check
39-
runs-on: ubuntu-latest
40-
steps:
41-
- uses: actions/checkout@v4
42-
43-
- name: Install uv
44-
uses: astral-sh/setup-uv@v5
45-
with:
46-
version: "latest"
47-
48-
- name: Set up Python
49-
run: uv python install 3.12
50-
51-
- name: Install dependencies
52-
run: uv sync --extra dev
53-
54-
- name: Type check
55-
run: uv run ty check
19+
- uses: astral-sh/setup-uv@v5
20+
- run: uv sync --group dev
21+
- run: make check
5622

5723
test:
58-
name: Test (Python ${{ matrix.python-version }})
24+
name: Test (${{ matrix.python-version }})
5925
runs-on: ubuntu-latest
6026
strategy:
6127
fail-fast: false
6228
matrix:
63-
python-version: ["3.10", "3.11", "3.12", "3.13"]
64-
29+
python-version: ["3.11", "3.12", "3.13"]
6530
steps:
6631
- uses: actions/checkout@v4
67-
68-
- name: Install system dependencies
69-
run: |
70-
sudo apt-get update
71-
sudo apt-get install -y libhidapi-dev libudev-dev
72-
73-
- name: Install uv
74-
uses: astral-sh/setup-uv@v5
75-
with:
76-
version: "latest"
77-
78-
- name: Set up Python ${{ matrix.python-version }}
79-
run: uv python install ${{ matrix.python-version }}
80-
81-
- name: Install dependencies
82-
run: uv sync --extra dev
83-
84-
- name: Run tests
85-
run: uv run pytest --cov=uchroma --cov-report=xml --cov-report=term
86-
87-
- name: Upload coverage
32+
- uses: astral-sh/setup-uv@v5
33+
- run: sudo apt-get update && sudo apt-get install -y libhidapi-dev libudev-dev
34+
- run: uv python install ${{ matrix.python-version }}
35+
- run: uv sync --group dev
36+
- run: uv run pytest --cov=uchroma --cov-report=xml
37+
- uses: codecov/codecov-action@v4
8838
if: matrix.python-version == '3.12'
89-
uses: codecov/codecov-action@v4
9039
with:
9140
files: coverage.xml
9241
fail_ci_if_error: false
9342
env:
9443
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
9544

9645
build:
97-
name: Build Package
46+
name: Build
9847
runs-on: ubuntu-latest
9948
steps:
10049
- uses: actions/checkout@v4
101-
102-
- name: Install system dependencies
103-
run: |
104-
sudo apt-get update
105-
sudo apt-get install -y libhidapi-dev libudev-dev
106-
107-
- name: Install uv
108-
uses: astral-sh/setup-uv@v5
109-
with:
110-
version: "latest"
111-
112-
- name: Set up Python
113-
run: uv python install 3.12
114-
115-
- name: Build package
116-
run: uv build
117-
118-
- name: Upload artifacts
119-
uses: actions/upload-artifact@v4
50+
- uses: astral-sh/setup-uv@v5
51+
- run: sudo apt-get update && sudo apt-get install -y libhidapi-dev libudev-dev
52+
- run: uv build
53+
- uses: actions/upload-artifact@v4
12054
with:
12155
name: dist
12256
path: dist/

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "1.1.0"
44
description = "Userspace RGB control for Razer Chroma peripherals"
55
readme = "README.md"
66
license = "LGPL-3.0-only"
7-
requires-python = ">=3.10"
7+
requires-python = ">=3.11"
88
authors = [{ name = "Stefanie Jane", email = "stef@hyperbliss.tech" }]
99
keywords = ["razer", "chroma", "rgb", "keyboard", "mouse", "linux"]
1010
classifiers = [
@@ -83,7 +83,7 @@ dev = [
8383
# ─────────────────────────────────────────────────────────────────────────────
8484
[tool.ruff]
8585
line-length = 100
86-
target-version = "py310"
86+
target-version = "py311"
8787

8888
[tool.ruff.format]
8989
docstring-code-format = true
@@ -125,7 +125,7 @@ combine-as-imports = true
125125
# ty - Type Checking
126126
# ─────────────────────────────────────────────────────────────────────────────
127127
[tool.ty.environment]
128-
python-version = "3.10"
128+
python-version = "3.11"
129129

130130
[tool.ty.rules]
131131
# Ignore missing stubs for external packages (hid, pyudev, evdev, coloraide, dbus-fast)

0 commit comments

Comments
 (0)