forked from brazilian-utils/python
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 821 Bytes
/
check-lint.yml
File metadata and controls
37 lines (30 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Check Lint
on:
pull_request:
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: |
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 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