mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-28 19:20:56 +00:00
Add black code formatter to continuous integration
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
name: Black code formatter
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
black:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install black
|
||||
run: pip install black
|
||||
|
||||
- name: Get changed python files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v37
|
||||
with:
|
||||
files: "**/*.py"
|
||||
|
||||
- name: Check changed files
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
run: black --check --color --diff --quiet ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
Reference in New Issue
Block a user