ci(python): rework of jobs + fix import issue

This commit is contained in:
2026-08-15 22:07:45 +02:00
parent 070fe7add0
commit cf907089da
+21 -86
View File
@@ -1,12 +1,15 @@
name: Python name: Python
env:
APT_DEPS: git python3 python3-pip python3-venv python3-gi python3-cairo python3-dbus python3-pyudev python3-psutil python3-evdev python3-yaml python3-xlib python3-pillow gir1.2-gtk-3.0
on: on:
pull_request: pull_request:
jobs: jobs:
fmt: static:
runs-on: alpine runs-on: debian
container: node:26-alpine container: node:26-trixie-slim
steps: steps:
- name: Checkout - name: Checkout
@@ -14,10 +17,8 @@ jobs:
- name: Install tools - name: Install tools
run: | run: |
apk add --no-cache \ apt-get update
git \ apt-get install -y --no-install-recommends git python3 python3-pip python3-venv
python3 \
py3-pip
python3 -m venv .venv python3 -m venv .venv
. .venv/bin/activate . .venv/bin/activate
pip install --no-cache-dir ruff pip install --no-cache-dir ruff
@@ -27,32 +28,15 @@ jobs:
. .venv/bin/activate . .venv/bin/activate
ruff format --check . ruff format --check .
lint:
runs-on: alpine
container: node:26-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tools
run: |
apk add --no-cache \
git \
python3 \
py3-pip
python3 -m venv .venv
. .venv/bin/activate
pip install --no-cache-dir ruff
- name: Lint - name: Lint
run: | run: |
. .venv/bin/activate . .venv/bin/activate
ruff check . ruff check .
test: verify:
runs-on: alpine if: always()
container: node:26-alpine runs-on: debian
container: node:26-trixie-slim
steps: steps:
- name: Checkout - name: Checkout
@@ -60,20 +44,16 @@ jobs:
- name: Install tools - name: Install tools
run: | run: |
apk add --no-cache \ apt-get update
git \ apt-get install -y --no-install-recommends $APT_DEPS build-essential python3-dev
python3 \ python3 -m venv --system-site-packages .venv
py3-pip \
py3-pillow \
build-base
python3 -m venv .venv
. .venv/bin/activate . .venv/bin/activate
pip install --no-cache-dir \ pip install --no-cache-dir basedpyright nuitka .
typer \
pillow \ - name: Type check
materialyoucolor \ run: |
jinja2 \ . .venv/bin/activate
pytest basedpyright
- name: Test - name: Test
run: | run: |
@@ -81,51 +61,6 @@ jobs:
cd cli cd cli
python -m pytest tests/ -v python -m pytest tests/ -v
typecheck:
runs-on: alpine
container: node:26-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tools
run: |
apk add --no-cache \
git \
python3 \
py3-pip
python3 -m venv .venv
. .venv/bin/activate
pip install --no-cache-dir basedpyright typer pillow materialyoucolor jinja2
- name: Type check
run: |
. .venv/bin/activate
basedpyright
buildcheck:
runs-on: alpine
container: node:26-alpine
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tools
run: |
apk add --no-cache \
git \
python3 \
py3-pip \
build-base \
python3-dev \
gcc \
g++
python3 -m venv .venv
. .venv/bin/activate
pip install --no-cache-dir nuitka
- name: Nuitka module check - name: Nuitka module check
run: | run: |
. .venv/bin/activate . .venv/bin/activate