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
|
name: Pyright Lint
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_call: # 允许此工作流作为可重用工作流被调用
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "*"
|
- "*"
|
||||||
@ -42,8 +43,8 @@ jobs:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
@ -66,7 +67,6 @@ jobs:
|
|||||||
run: poetry install
|
run: poetry install
|
||||||
|
|
||||||
- name: Run Pyright
|
- name: Run Pyright
|
||||||
shell: bash
|
uses: jakebailey/pyright-action@v2
|
||||||
run: |
|
with:
|
||||||
extra_args="${{ github.event.inputs.debug-mode == 'true' && '--warnings --verbose --level verbose' || '--warnings --verbose' }}"
|
pylance-version: latest-release
|
||||||
poetry run pyright . $extra_args
|
|
||||||
|
|||||||
3
.github/workflows/ruff.yml
vendored
3
.github/workflows/ruff.yml
vendored
@ -1,6 +1,7 @@
|
|||||||
name: Ruff Lint
|
name: Ruff Lint
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_call: # 允许此工作流作为可重用工作流被调用
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "*"
|
- "*"
|
||||||
@ -23,7 +24,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Install Ruff Format
|
- name: Install Ruff
|
||||||
uses: astral-sh/ruff-action@v3
|
uses: astral-sh/ruff-action@v3
|
||||||
- name: Run Ruff Check
|
- name: Run Ruff Check
|
||||||
run: ruff check
|
run: ruff check
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user