Skip to content

Commit 05b275d

Browse files
committed
adds lint step
1 parent 2d99fe4 commit 05b275d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/github-actions-ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@ env:
2222
MTRAIN_PASSWORD: password
2323

2424
jobs:
25+
lint:
26+
name: Lint
27+
runs-on: "ubuntu-latest"
28+
steps:
29+
- uses: actions/checkout@v2
30+
- name: flake8 linting
31+
run: |
32+
pip install flake8
33+
export PATH="/home/runner/.local/bin:${PATH}"
34+
git fetch origin master
35+
# `|| true` to force exit code 0 even if no files found
36+
CHANGED_PYFILES=$(git diff --name-only --diff-filter AM origin/master | grep .py || true)
37+
echo "List of changed files:"
38+
echo ${CHANGED_PYFILES}
39+
flake8 ${CHANGED_PYFILES} --count
40+
2541
allensdk:
2642
name: ${{ matrix.python-version }}, ${{ matrix.os }}
2743
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)