更新工作流

This commit is contained in:
HibiKier 2025-02-08 17:03:31 +08:00 committed by BalconyJH
parent dddba36647
commit 471a9da03a
No known key found for this signature in database
GPG Key ID: FF602923BD2A1FAF
3 changed files with 19 additions and 7 deletions

11
.github/workflows/linting.yml vendored Normal file
View File

@ -0,0 +1,11 @@
name: Sequential Lint and Type Check
on: [push, pull_request]
jobs:
ruff-call:
uses: ./.github/workflows/ruff.yml
pyright-call:
needs: ruff-call
uses: ./.github/workflows/pyright.yml

View File

@ -1,6 +1,7 @@
name: Pyright Lint
on:
workflow_call: # 允许此工作流作为可重用工作流被调用
push:
branches:
- "*"
@ -42,8 +43,8 @@ jobs:
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
@ -66,7 +67,6 @@ jobs:
run: poetry install
- name: Run Pyright
shell: bash
run: |
extra_args="${{ github.event.inputs.debug-mode == 'true' && '--warnings --verbose --level verbose' || '--warnings --verbose' }}"
poetry run pyright . $extra_args
uses: jakebailey/pyright-action@v2
with:
pylance-version: latest-release

View File

@ -1,6 +1,7 @@
name: Ruff Lint
on:
workflow_call: # 允许此工作流作为可重用工作流被调用
push:
branches:
- "*"
@ -23,7 +24,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Ruff Format
- name: Install Ruff
uses: astral-sh/ruff-action@v3
- name: Run Ruff Check
run: ruff check