Skip to content

Commit

Permalink
✨ 更新工作流
Browse files Browse the repository at this point in the history
  • Loading branch information
HibiKier authored and BalconyJH committed Feb 8, 2025
1 parent dddba36 commit 471a9da
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 6 additions & 6 deletions .github/workflows/pyright.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Pyright Lint

on:
workflow_call: # 允许此工作流作为可重用工作流被调用
push:
branches:
- "*"
Expand Down Expand Up @@ -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:
Expand All @@ -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 changes: 2 additions & 1 deletion .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Ruff Lint

on:
workflow_call: # 允许此工作流作为可重用工作流被调用
push:
branches:
- "*"
Expand All @@ -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
Expand Down

0 comments on commit 471a9da

Please sign in to comment.