From 616f9731426bde69cb3b282b24fa405a4c23d265 Mon Sep 17 00:00:00 2001 From: Rajiv Ranjan Singh Date: Fri, 28 Aug 2020 16:22:12 +0530 Subject: [PATCH] added black and flake8 linters --- .github/workflows/black.yml | 25 +++++++++++++++++++++++++ .github/workflows/flake8.yml | 20 ++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/black.yml create mode 100644 .github/workflows/flake8.yml diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml new file mode 100644 index 0000000..59f6e62 --- /dev/null +++ b/.github/workflows/black.yml @@ -0,0 +1,25 @@ +name: Black + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + formatting: + name: Black Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup black environment + run: conda create --quiet --name black black + + - name: Check formatting + run: | + export PATH="/usr/share/miniconda/bin:$PATH" + source activate black + black --check . diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml new file mode 100644 index 0000000..855c257 --- /dev/null +++ b/.github/workflows/flake8.yml @@ -0,0 +1,20 @@ +name: Flake8 + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + gitHubActionForFlake8: + name: Flake8 Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: GitHub Action for Flake8 + uses: cclauss/GitHub-Action-for-Flake8@master + with: + args: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics