From 129d81115b0713ee269ff81cbd447b63f95dbdd8 Mon Sep 17 00:00:00 2001 From: Filipe Borges Date: Tue, 28 May 2024 17:15:43 +0200 Subject: [PATCH] throw warning if code isnt formatted Signed-off-by: Filipe Borges --- .github/workflows/backend-workflow.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backend-workflow.yml b/.github/workflows/backend-workflow.yml index cc8e574..94b72b9 100644 --- a/.github/workflows/backend-workflow.yml +++ b/.github/workflows/backend-workflow.yml @@ -25,15 +25,20 @@ jobs: with: path: main - # Install python + # Install python - name: Set up Python 3.11 uses: actions/setup-python@v4 with: python-version: 3.11 - name: Install dependencies - run: + run: | pip install -r codebase/requirements.txt + pip install black + + - name: Run linting + run: | + black --check . || echo "::warning::Code formatting issues found. Please run black to format your code." - name: Run tests run: bash scripts/test.sh