diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 000000000..4c9561867 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,36 @@ +name: github-FORMAT + +on: + push + #pull_request: + # paths-ignore: + # - '**/*.rst' + # - '**/*.md' + # - 'doc/**' + # types: [ opened, reopened, synchronize ] + +permissions: + contents: none + +# Cancels any in progress 'workflow' associated with this PR +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + format-check: + name: format-check + runs-on: [ubuntu-latest] + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + path: OpenCSP + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Black formatting check + run: | + pip install black + black . -S -C --check --diff \ No newline at end of file