mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
✨ 更新工作流
This commit is contained in:
parent
dddba36647
commit
471a9da03a
11
.github/workflows/linting.yml
vendored
Normal file
11
.github/workflows/linting.yml
vendored
Normal 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
|
||||
12
.github/workflows/pyright.yml
vendored
12
.github/workflows/pyright.yml
vendored
@ -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
|
||||
|
||||
3
.github/workflows/ruff.yml
vendored
3
.github/workflows/ruff.yml
vendored
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user