From 040b893f3b617fd3945ff7f018785c21f0211d44 Mon Sep 17 00:00:00 2001 From: united_pooh Date: Sat, 14 Mar 2026 21:08:20 +0800 Subject: [PATCH] Create lint.yml --- .github/workflows/lint.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..f5fae85a8 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,34 @@ +name: Code Quality Control + +on: + push: + branches: [ "main", "dev" ] + pull_request: + branches: [ "main", "dev" ] + +jobs: + lint-and-format: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install tools + run: | + pip install pyclean ruff + + - name: 1. Clean python bytecode + run: pyclean . + + - name: 2. Ruff format + run: ruff format . + + - name: 3. Ruff check and fix + run: ruff check . --fix + env: + PYTHONIOENCODING: utf-8