Improved codecov (#776) #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python_format | |
on: [push, pull_request] | |
jobs: | |
Python_format: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Install black | |
run: pip install black | |
- name: Run black for format check | |
run: black --check --diff . | |
- name: Fail if formatting issues are found | |
if: failure() | |
run: | | |
echo "Python code is not properly formatted. Please run 'black .' and commit the changes." | |
exit 1 |