open source

This commit is contained in:
ihmily
2025-03-24 19:55:40 +08:00
parent 34e3e6fd5f
commit 8ce3aed3b9
66 changed files with 7678 additions and 16 deletions

40
.github/workflows/python-lint.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Run Python Lint Checks
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
jobs:
lint-python:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install ruff
- name: Run ruff lint check
run: ruff check . --config .ruff.toml --exclude="*.md,*.txt"
working-directory: .