Move black to CI

pull/1/head
cidrblock 2020-10-12 12:04:00 -07:00
parent bdd4ef9c26
commit 3fece8765a
2 changed files with 26 additions and 24 deletions

View File

@ -175,3 +175,29 @@ jobs:
- uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false
##
# Formatting with black
# Require all code be formatted with black
# with line length 79
black:
name: Black (formatting)
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/ansible/utils
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Black
run: pip install black
- name: Run black --check
run: black -l79 --check ansible_collections/ansible/utils

View File

@ -1,24 +0,0 @@
name: Check formatting with the latest black
on:
- push
- pull_request
jobs:
black:
name: Black (formatting)
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ansible_collections/ansible/utils
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Black
run: pip install black
- name: Run black --check
run: black --check ansible_collections/ansible/utils