2023-12-31 23:52:57 +00:00
|
|
|
# This workflow runs the python code quality checks.
|
|
|
|
#
|
|
|
|
# It may be triggered via dispatch, or by another workflow.
|
|
|
|
#
|
|
|
|
# TODO: Add mypy or pyright to the checks.
|
|
|
|
|
2023-12-23 14:16:05 +00:00
|
|
|
name: 'Check: python'
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
workflow_call:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check-backend:
|
|
|
|
runs-on: ubuntu-latest
|
2024-02-01 22:20:09 +00:00
|
|
|
timeout-minutes: 5 # expected run time: <1 min
|
2023-12-23 14:16:05 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Install python dependencies
|
|
|
|
uses: ./.github/actions/install-python-deps
|
|
|
|
|
|
|
|
- name: Install ruff
|
|
|
|
run: pip install ruff
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Ruff check
|
|
|
|
run: ruff check --output-format=github .
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Ruff format
|
|
|
|
run: ruff format --check .
|
|
|
|
shell: bash
|