From a43fcc873e47560f0e71d590c4611375fcb849ca Mon Sep 17 00:00:00 2001 From: etotmeni Date: Wed, 7 Jul 2021 08:57:47 -0500 Subject: [PATCH 1/2] Test black on self-hosted --- .github/workflows/test_build.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/test_build.yml diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml new file mode 100644 index 0000000000..4692da1111 --- /dev/null +++ b/.github/workflows/test_build.yml @@ -0,0 +1,29 @@ +# This is a workflow to format Python code with black formatter + +name: Python Code Style + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + pull_request: + push: + branches: [master] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + + black: + # The type of runner that the job will run on + runs-on: self-hosted + + # 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@21.4b2 + with: + args: ". --check" From 337c05630a186eff3ac08d6feaed828dcb517f43 Mon Sep 17 00:00:00 2001 From: etotmeni Date: Wed, 7 Jul 2021 08:59:59 -0500 Subject: [PATCH 2/2] Fix --- .github/workflows/test_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_build.yml b/.github/workflows/test_build.yml index 4692da1111..c90353f3cd 100644 --- a/.github/workflows/test_build.yml +++ b/.github/workflows/test_build.yml @@ -1,6 +1,6 @@ # This is a workflow to format Python code with black formatter -name: Python Code Style +name: My Code Style # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch