wip #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Python | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
workflow_call: | |
jobs: | |
check-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/check-python-changes | |
id: check-python-changes | |
- uses: ./.github/actions/setup-python | |
if: steps.check-python-changes.outputs.files_changed == 'true' | |
- name: Install dependencies with pip | |
if: steps.check-python-changes.outputs.files_changed == 'true' | |
run: pip install ruff | |
- name: Ruff check | |
if: steps.check-python-changes.outputs.files_changed == 'true' | |
run: ruff check --output-format=github . | |
- name: Ruff format | |
if: steps.check-python-changes.outputs.files_changed == 'true' | |
run: ruff format --check . |