77 lines
2.0 KiB
YAML
77 lines
2.0 KiB
YAML
name: Python
|
|
|
|
env:
|
|
APK_DEPS: py3-pillow py3-gi py3-cairo py3-dbus py3-udev py3-psutil py3-evdev py3-yaml py3-xlib py3-typing-extensions gtk+3.0
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
static:
|
|
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: Format check
|
|
run: |
|
|
. .venv/bin/activate
|
|
ruff format --check .
|
|
|
|
- name: Lint
|
|
run: |
|
|
. .venv/bin/activate
|
|
ruff check .
|
|
|
|
verify:
|
|
if: always()
|
|
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 \
|
|
$APK_DEPS \
|
|
build-base \
|
|
python3-dev \
|
|
gcc \
|
|
g++
|
|
python3 -m venv --system-site-packages .venv
|
|
. .venv/bin/activate
|
|
pip install --no-cache-dir basedpyright nuitka .
|
|
|
|
- name: Type check
|
|
run: |
|
|
. .venv/bin/activate
|
|
basedpyright
|
|
|
|
- name: Test
|
|
run: |
|
|
. .venv/bin/activate
|
|
cd cli
|
|
python -m pytest tests/ -v
|
|
|
|
- name: Nuitka module check
|
|
run: |
|
|
. .venv/bin/activate
|
|
nuitka --module --include-package=zshell cli/src/zshell/
|