2024-01-03 23:43:35 +01:00
|
|
|
name: Python CI
|
2024-03-31 10:47:53 +02:00
|
|
|
|
2024-01-03 23:43:35 +01:00
|
|
|
on:
|
|
|
|
push:
|
2024-03-31 10:51:13 +02:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- dev
|
2024-01-03 23:43:35 +01:00
|
|
|
pull_request:
|
2024-03-31 10:51:13 +02:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- dev
|
2024-03-31 10:47:53 +02:00
|
|
|
|
2024-01-03 23:43:35 +01:00
|
|
|
jobs:
|
|
|
|
build:
|
2024-01-05 02:18:20 +01:00
|
|
|
name: 'Format Backend'
|
2024-01-03 23:43:35 +01:00
|
|
|
runs-on: ubuntu-latest
|
2024-03-31 10:47:53 +02:00
|
|
|
|
2024-01-03 23:43:35 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-03-31 10:47:53 +02:00
|
|
|
python-version: [3.11]
|
|
|
|
|
2024-01-03 23:43:35 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-03-31 10:47:53 +02:00
|
|
|
|
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
2024-01-03 23:43:35 +01:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2024-03-31 10:43:52 +02:00
|
|
|
pip install black
|
2024-03-31 10:47:53 +02:00
|
|
|
|
2024-01-03 23:43:35 +01:00
|
|
|
- name: Format backend
|
2024-03-31 23:13:39 +02:00
|
|
|
run: npm run format:backend
|
2024-03-31 10:47:53 +02:00
|
|
|
|
2024-03-29 00:42:50 +01:00
|
|
|
- name: Check for changes after format
|
|
|
|
run: git diff --exit-code
|