File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 4646 - name : Run Unittests
4747 run : |
4848 docker run reframe:${{ matrix.modules-version }}
49+
50+ flake8 :
51+ if : github.event_name == 'pull_request'
52+ runs-on : ubuntu-latest
53+ steps :
54+ - uses : actions/checkout@v2
55+ with :
56+ fetch-depth : 0
57+ - name : Changed Python Files
58+ run : |
59+ echo 'CHANGED_PYTHON_FILES<<EOF' >> $GITHUB_ENV
60+ git diff --name-only ${{ github.event.pull_request.base.sha }}..${{ github.sha }} | grep '.py' >> $GITHUB_ENV
61+ echo 'EOF' >> $GITHUB_ENV
62+ - uses : actions/setup-python@v2
63+ with :
64+ python-version : 3.8
65+ - name : Unused Imports Check
66+ run : |
67+ pip install flake8
68+ echo 'Checking Python Files:'
69+ for f in "$CHANGED_PYTHON_FILES"; do echo "$f"; done
70+ flake8 --select F401 $CHANGED_PYTHON_FILES
Original file line number Diff line number Diff line change 1616
1717import reframe
1818import reframe .core .config as config
19- import reframe .core .environments as env
2019import reframe .core .exceptions as errors
2120import reframe .core .logging as logging
2221import reframe .core .runtime as runtime
Original file line number Diff line number Diff line change 1010import ast
1111import collections .abc
1212import inspect
13- import io
1413import os
1514
1615import reframe .utility as util
1716import reframe .utility .osext as osext
18- from reframe .core .exceptions import NameConflictError , RegressionTestLoadError
17+ from reframe .core .exceptions import NameConflictError
1918from reframe .core .logging import getlogger
2019
2120
You can’t perform that action at this time.
0 commit comments