aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/lint.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..39846ae
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,28 @@
+name: Lint Python code
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ lint:
+ name: "Lint code"
+ # 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
+ - name: Checkout branch
+ uses: actions/checkout@v2
+
+ - name: Install Poetry and project dependencies
+ uses: knowsuchagency/poetry-install@v2
+
+ - name: Setup flake8 annotations
+ uses: rbialon/flake8-annotations@v1
+
+ - name: Lint code with Flake8
+ run: poetry run flake8 . --count --show-source --statistics