Skip to content

Add ci formatcheck

Add ci formatcheck #3

Workflow file for this run

name: format-python
on: pull_request
jobs:
format:
# Check if the PR is not from a fork
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
ref: ${{ github.head_ref }}
- name: black
uses: lgeiger/[email protected]
with:
args: .
- name: Check for modified files
id: git-check
run: if git diff-index HEAD --; then echo "Code formatting inconsistent. Please format using Black." && exit 1; else echo "Code formatting is consistent with Black."; fi