Skip to content

Commit

Permalink
- Fixed pipeline - should run on every action for code quality checks
Browse files Browse the repository at this point in the history
- Added black formatting steps to check whether the codes are formatted or not before merge
  • Loading branch information
Subhransu Das committed Jun 8, 2024
1 parent ee73aa4 commit 3255946
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ name: Python application

on:
push:
branches: [ master ]
branches:
- '**'
create:
branches:
- '**'
tags:
- '**'
pull_request:
branches: [ master ]
branches:
- master # Run on pull requests targeting the master branch

jobs:
build:
Expand All @@ -31,6 +38,12 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Check formatting
run: |
# stop the build if there are formatting is error in any python codes
# to check whether the codes are formatted or not before merge
pip install black==24.4.2
python -m black -t py310 --check .
- name: Test with pytest
run: |
pytest

0 comments on commit 3255946

Please sign in to comment.