ci: Limit workflows to Python files and optimize environment setup (#4567)
* Limit style check workflow to Python files only * refactor: update autofix workflow to target Python files and optimize environment setup
This commit is contained in:
parent
151c369c6b
commit
f91a700893
2 changed files with 9 additions and 6 deletions
13
.github/workflows/py_autofix.yml
vendored
13
.github/workflows/py_autofix.yml
vendored
|
|
@ -2,9 +2,7 @@ name: autofix.ci
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "poetry.lock"
|
- "**/*.py"
|
||||||
- "pyproject.toml"
|
|
||||||
- "src/backend/**"
|
|
||||||
env:
|
env:
|
||||||
POETRY_VERSION: "1.8.2"
|
POETRY_VERSION: "1.8.2"
|
||||||
|
|
||||||
|
|
@ -14,7 +12,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: install-pinned/ruff@9ebc31a5721a0fb034f915e4bbcb2ee6feeaecbc
|
- name: "Setup Environment"
|
||||||
- run: ruff check --fix-only .
|
uses: ./.github/actions/setup-uv
|
||||||
- run: ruff format .
|
- run: uv run ruff check --fix-only .
|
||||||
|
- run: uv run ruff format .
|
||||||
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
|
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
|
||||||
|
- name: Minimize uv cache
|
||||||
|
run: uv cache prune --ci
|
||||||
|
|
|
||||||
2
.github/workflows/style-check-py.yml
vendored
2
.github/workflows/style-check-py.yml
vendored
|
|
@ -3,6 +3,8 @@ name: Ruff Style Check
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened, auto_merge_enabled]
|
types: [opened, synchronize, reopened, auto_merge_enabled]
|
||||||
|
paths:
|
||||||
|
- "**/*.py"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue