mirror of
https://github.com/licsber/micropython.git
synced 2024-09-21 01:20:23 +08:00
303ccca7c6
- Add config for [tool.ruff.format] to pyproject.toml. - Update pre-commit to run both ruff and ruff-format (and only check C files when running codeformat.py) - Update CI. - Simplify codeformat.py to remove all the Python-specific logic (just run "ruff format" directly). This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
31 lines
808 B
YAML
31 lines
808 B
YAML
name: Check code formatting
|
|
|
|
on: [push, pull_request]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
code-formatting:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v4
|
|
- name: Install packages
|
|
run: source tools/ci.sh && ci_c_code_formatting_setup
|
|
- name: Run code formatting
|
|
run: source tools/ci.sh && ci_c_code_formatting_run
|
|
- name: Check code formatting
|
|
run: git diff --exit-code
|
|
|
|
code-spelling:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v4
|
|
- name: Install packages
|
|
run: source tools/ci.sh && ci_code_spell_setup
|
|
- name: Run spell checker
|
|
run: source tools/ci.sh && ci_code_spell_run
|