open-webui/.github/workflows/format-backend.yaml

35 lines
655 B
YAML
Raw Normal View History

2024-01-03 22:43:35 +00:00
name: Python CI
2024-03-31 08:47:53 +00:00
2024-01-03 22:43:35 +00:00
on:
push:
branches: ['main']
pull_request:
2024-03-31 08:47:53 +00:00
2024-01-03 22:43:35 +00:00
jobs:
build:
name: 'Format Backend'
2024-01-03 22:43:35 +00:00
runs-on: ubuntu-latest
2024-03-31 08:47:53 +00:00
2024-01-03 22:43:35 +00:00
strategy:
matrix:
2024-03-31 08:47:53 +00:00
python-version: [3.11]
2024-01-03 22:43:35 +00:00
steps:
- uses: actions/checkout@v4
2024-03-31 08:47:53 +00:00
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
2024-01-03 22:43:35 +00:00
- name: Install dependencies
run: |
python -m pip install --upgrade pip
2024-03-31 08:43:52 +00:00
pip install black
2024-03-31 08:47:53 +00:00
2024-01-03 22:43:35 +00:00
- name: Format backend
2024-03-31 08:47:53 +00:00
run: black . --exclude "/venv/"
- name: Check for changes after format
run: git diff --exit-code