From ab29736d653fd5bb0b3c568033a862ce20262593 Mon Sep 17 00:00:00 2001 From: k9845 Date: Wed, 20 Mar 2024 10:46:28 +0545 Subject: [PATCH] Add github action for black and flake8 --- .github/workflows/black.yml | 21 +++++++++++++++++++++ .github/workflows/flake8.yml | 25 +++++++++++++++++++++++++ 2 files changed, 46 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 000000000..ef8ce5169 --- /dev/null +++ b/.github/workflows/black.yml @@ -0,0 +1,21 @@ +name: Black Check + +on: + pull_request: + push: + branches: + - develop + +jobs: + check: + name: Black Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Install black + run: pip install black + - name: Run black + uses: rickstaa/action-black@v1 + with: + black_args: ". --check" diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml new file mode 100644 index 000000000..976841f1d --- /dev/null +++ b/.github/workflows/flake8.yml @@ -0,0 +1,25 @@ +name: Flake8 check. + +on: + pull_request: + push: + branches: + - develop + +jobs: + check: + name: Flake8 check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + # Flake8 check + - name: Install flake8 + run: pip install flake8 + - name: Run flake8 + uses: suo/flake8-github-action@releases/v1 + with: + # NOTE: this needs to be the same as the job name + checkName: 'Flake8 check' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}