mirror of
https://github.com/ihmily/StreamCap.git
synced 2026-05-07 05:57:45 +08:00
- Update deprecated APIs - Adapt breaking changes in flet 0.80+ - Test UI components compatibility
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
name: Run Python Lint Checks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'app/**'
|
|
- '.ruff.toml'
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
paths:
|
|
- 'app/**'
|
|
- '.ruff.toml'
|
|
|
|
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 main.py app --config .ruff.toml
|
|
working-directory: .
|
|
|
|
- name: Run ruff format check
|
|
run: ruff format --check --diff main.py app --config .ruff.toml
|
|
working-directory: .
|