mirror of
https://github.com/ihmily/StreamCap.git
synced 2026-05-20 16:47:44 +08:00
open source
This commit is contained in:
40
.github/workflows/python-lint.yml
vendored
Normal file
40
.github/workflows/python-lint.yml
vendored
Normal 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: .
|
||||
Reference in New Issue
Block a user