diff --git a/.gitea/workflows/python.yml b/.gitea/workflows/python.yml index 011ba51..34f7f2a 100644 --- a/.gitea/workflows/python.yml +++ b/.gitea/workflows/python.yml @@ -1,10 +1,13 @@ 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: - fmt: + static: runs-on: alpine container: node:26-alpine @@ -27,30 +30,13 @@ jobs: . .venv/bin/activate 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 run: | . .venv/bin/activate ruff check . - test: + verify: + if: always() runs-on: alpine container: node:26-alpine @@ -64,16 +50,19 @@ jobs: git \ python3 \ py3-pip \ - py3-pillow \ - build-base - python3 -m venv .venv + $APK_DEPS \ + build-base \ + python3-dev \ + gcc \ + g++ + python3 -m venv --system-site-packages .venv . .venv/bin/activate - pip install --no-cache-dir \ - typer \ - pillow \ - materialyoucolor \ - jinja2 \ - pytest + pip install --no-cache-dir basedpyright nuitka . + + - name: Type check + run: | + . .venv/bin/activate + basedpyright - name: Test run: | @@ -81,51 +70,6 @@ jobs: cd cli 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 run: | . .venv/bin/activate