From b58cc81683ec7a9c21393de52ffe5e62f96c54e4 Mon Sep 17 00:00:00 2001 From: Sergey Pokhodenko Date: Thu, 15 Oct 2020 09:35:21 +0300 Subject: [PATCH] Add GitHub Actions for black See https://black.readthedocs.io/en/stable/github_actions.html --- .github/workflows/black.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/black.yml diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml new file mode 100644 index 0000000000..be581fd2f3 --- /dev/null +++ b/.github/workflows/black.yml @@ -0,0 +1,28 @@ +# This is a workflow to format Python code with black formatter + +name: black + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [master] + pull_request: + branches: [master] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "black" + black: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + # Set up a Python environment for use in actions + - uses: actions/setup-python@v2 + + # Run black code formatter + - uses: psf/black@stable