mirror of
https://github.com/AstrBotDevs/AstrBot.git
synced 2026-11-23 06:32:12 +08:00
35 lines
682 B
YAML
35 lines
682 B
YAML
name: Code Format Check
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ master ]
|
|
push:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
format-check:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v7
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install UV
|
|
run: pip install uv
|
|
|
|
- name: Install dependencies
|
|
run: uv sync
|
|
|
|
- name: Check code formatting with ruff
|
|
run: |
|
|
uvx --from ruff==0.15.22 ruff format --check .
|
|
|
|
- name: Check code style with ruff
|
|
run: |
|
|
uvx --from ruff==0.15.22 ruff check .
|