From 0813853345e51afdb42c67df5193f77f20f26001 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 20 May 2020 19:17:11 -0400 Subject: [PATCH] Add flake8 linting via reviewdog and GitHub Actions. --- .github/workflows/reviewdog.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/reviewdog.yml diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml new file mode 100644 index 00000000..940af49b --- /dev/null +++ b/.github/workflows/reviewdog.yml @@ -0,0 +1,30 @@ +name: Linting +on: [pull_request] + +jobs: + flake8: + name: flake8 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Python 3 + uses: actions/setup-python@v1 + with: + python-version: 3.8 + + - name: Install flake8 + run: pip3 install -r flake8 + + - name: Set up reviewdog + run: | + mkdir -p $HOME/bin + curl -sfL \ + https://github.com/reviewdog/reviewdog/raw/master/install.sh | \ + sh -s -- -b $HOME/bin + echo ::add-path::$HOME/bin + + - name: Run flake8 + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: flake8 | reviewdog -f=pep8 -name=flake8 -reporter=github-check