From 3fece8765a312e39f1d21cbe8ee721f55c4d9306 Mon Sep 17 00:00:00 2001 From: cidrblock Date: Mon, 12 Oct 2020 12:04:00 -0700 Subject: [PATCH] Move black to CI --- .github/workflows/ansible-test.yml | 26 ++++++++++++++++++++++++++ .github/workflows/black.yml | 24 ------------------------ 2 files changed, 26 insertions(+), 24 deletions(-) delete mode 100644 .github/workflows/black.yml diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index aa9967b..43add20 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml deleted file mode 100644 index 9a489e3..0000000 --- a/.github/workflows/black.yml +++ /dev/null @@ -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 \ No newline at end of file