From 9a02b4e9745bc1d1a49ac8d4aa16aaa46808013b Mon Sep 17 00:00:00 2001 From: Space-Banane Date: Sat, 7 Feb 2026 12:04:00 +0100 Subject: [PATCH] add Gitea CI workflow for linting and testing Python code --- {.github => .gitea}/workflows/test.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) rename {.github => .gitea}/workflows/test.yml (67%) diff --git a/.github/workflows/test.yml b/.gitea/workflows/test.yml similarity index 67% rename from .github/workflows/test.yml rename to .gitea/workflows/test.yml index 283bece..fdf9aaf 100644 --- a/.github/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -1,4 +1,4 @@ -name: Python CI +name: Gitea CI on: push: @@ -7,17 +7,15 @@ on: branches: [ "main", "master" ] jobs: - build: + lint-and-test: + # Use a container to avoid dependency on host runner python versions runs-on: ubuntu-latest + container: + image: python:3.14-slim steps: - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.14" - - name: Install dependencies run: | python -m pip install --upgrade pip @@ -27,9 +25,8 @@ jobs: - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names + # E9, F63, F7, F82 are logic/syntax errors flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Check syntax run: |