From 591cbb963a3d06ce524e25edfddea7f620ea79bc Mon Sep 17 00:00:00 2001 From: Username Date: Sun, 18 Jan 2026 17:47:04 +0100 Subject: [PATCH] ci: add lint and syntax check workflow --- .gitea/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..feba1e0 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + name: Lint & Check + runs-on: ubuntu-latest + container: + image: python:3.11-slim + + steps: + - name: Setup and checkout + run: | + apt-get update -qq && apt-get install -yqq --no-install-recommends git >/dev/null + git clone --depth 1 --branch "${GITHUB_REF_NAME}" \ + "https://oauth2:${{ github.token }}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git" . + + - name: Install tools + run: pip install -q ruff + + - name: Syntax check + run: python -m py_compile gitea-ci.py + + - name: Lint + run: ruff check gitea-ci.py + + - name: Test --help + run: python gitea-ci.py --help