A little tuning

This commit is contained in:
Odd Stråbø 2020-09-26 03:36:32 +02:00
commit 45d5ca3570

View file

@ -1,6 +1,6 @@
name: Python sanity name: Python sanity
on: [push, pull_request] on: [pull_request]
jobs: jobs:
build: build:
@ -9,7 +9,7 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
python-version: [2.7, 3.6, 3.7, 3.8] python-version: [2.7, 3.8]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -26,7 +26,9 @@ jobs:
- name: Lint with flake8 - name: Lint with flake8
run: | run: |
# stop the build if there are Python syntax errors or undefined names # stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics flake8 . --select=E9,F63,F7,F82 \
| awk -F: '{ gsub(/^[ \t]+/,"",$4); print "::error file=" $1 ",line=" $2 ",col=" $3 "::" $4 }'
# exit-zero treats all errors as warnings. # exit-zero treats all errors as warnings.
flake8 . --exit-zero \ flake8 . --exit-zero \
| awk -F: '{ gsub(/^[ \t]+/,"",$4); print "::error file=" $1 ",line=" $2 ",col=" $3 "::" $4 }' | awk -F: '{ gsub(/^[ \t]+/,"",$4); print "::error file=" $1 ",line=" $2 ",col=" $3 "::" $4 }'