File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 88
88
${{ matrix.command }}
89
89
env :
90
90
REFERENCE_BRANCH : ${{ github['base_ref'] || github['head_ref'] }}
91
+
92
+ pylint-py27 :
93
+ name : Pylint for Python 2.7 in Pilot files
94
+ runs-on : ubuntu-latest
95
+ if : github.event_name != 'push' || github.repository == 'DIRACGrid/DIRAC'
96
+ steps :
97
+ - uses : actions/checkout@v2
98
+ - name : Fail-fast for outdated pipelines
99
+ run : .github/workflows/fail-fast.sh
100
+ - name : prepare environment
101
+ run : |
102
+ conda config --set add_pip_as_python_dependency false
103
+ conda create -c conda-forge -n test-env python=2.7 pylint=1.9.2 astroid=1.6.5
104
+ - name : run pilot wrapper test
105
+ run : |
106
+ eval "$(conda shell.bash hook)" && conda activate test-env
107
+ pylint -E \
108
+ tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py \
109
+ src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py \
110
+ src/DIRAC/Resources/Computing/BatchSystems/*.py
Original file line number Diff line number Diff line change @@ -22,3 +22,23 @@ repos:
22
22
rev : 22.1.0
23
23
hooks :
24
24
- id : black
25
+ exclude : |
26
+ (?x)^(
27
+ src/DIRAC/Resources/Computing/BatchSystems/[^/]+.py|
28
+ src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py|
29
+ tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py
30
+ )$
31
+
32
+ - repo : https://github.com/psf/black
33
+ rev : 21.9b0
34
+ hooks :
35
+ - id : black
36
+ name : black for files with Python 2.7 compatibility
37
+ additional_dependencies : [".[python2]"]
38
+ args : ["--target-version=py27"]
39
+ files : |
40
+ (?x)^(
41
+ src/DIRAC/Resources/Computing/BatchSystems/[^/]+.py|
42
+ src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py|
43
+ tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py
44
+ )$
You can’t perform that action at this time.
0 commit comments