Skip to content
14 changes: 12 additions & 2 deletions .github/workflows/check-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,34 @@ on:
push:
branches:
- main

jobs:
lint:
name: Check Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Poetry Setup
uses: snok/install-poetry@v1

- name: Install Dependencies
run: poetry install

- name: Run Lint Check
id: lint
run: |
make check
set -o pipefail
make check 2>&1 | tee lint_output.log
continue-on-error: true

- name: Lint Failed
if: steps.lint.outcome != 'success'
run: |
echo -e "\033[0;31m Please, run \`make format\` and push the changes to fix this error"
echo -e "\033[0;31m Linting failed. See the errors below:\n"
cat lint_output.log
echo -e "\n\033[0;33m Please, run \`make format\` and push the changes to fix this error."
exit 1