add Gitea CI workflow for linting and testing Python code
Some checks failed
Gitea CI / lint-and-test (push) Failing after 7s

This commit is contained in:
Space-Banane
2026-02-07 12:04:00 +01:00
parent 144d9c1618
commit 9a02b4e974

View File

@@ -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: |