forked from HEPCloud/decisionengine_modules
-
Notifications
You must be signed in to change notification settings - Fork 0
182 lines (160 loc) · 5.74 KB
/
linters.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# SPDX-FileCopyrightText: 2017 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
---
name: Linters
on:
push:
branches:
- "**" # matches every branch
- "!gh-pages" # excludes gh-pages branch
pull_request:
branches:
- master
jobs:
run_flake8:
if: ${{ github.ref == 'refs/heads/1.7' }}
name: Run pytest-flake8 against code tree
runs-on: ubuntu-latest
steps:
- name: checkout DE Modules
uses: actions/checkout@v3
with:
path: decisionengine_modules
- name: checkout DE Framework
uses: actions/checkout@v3
with:
path: decisionengine
repository: HEPCloud/decisionengine
- name: checkout GlideinWMS for python3
uses: actions/checkout@v3
with:
path: glideinwms
repository: glideinWMS/glideinwms
ref: branch_v3_9
- uses: actions/setup-python@v4
with:
python-version: "3.9"
architecture: "x64"
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Note Python version/implementation
run: |
which python3
python3 -c 'import sys; print(sys.version)'
python3 -c 'import platform; print(platform.python_implementation())'
python3 -m pip cache dir
- name: Install dependencies for GlideinWMS
run: |
set -x
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip install -r ${{ github.workspace }}/glideinwms/requirements.txt
- name: Install dependencies for DE Framework
run: |
set -x
cd ${{ github.workspace }}/decisionengine
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip install --upgrade pytest
python3 -m pip install --user Cython
python3 -m pip install --user numpy
python3 setup.py bdist_wheel
python3 -m pip install --user dist/decisionengine*.whl
- name: Install DE Modules dependencies
run: |
set -x
cd ${{ github.workspace }}/decisionengine_modules
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pytest
python3 -m pip install -e .[develop] --user
python3 -m pip list --user
- name: Run Flake8 checks
env:
PYTHONPATH: ${{ github.workspace }}/../:${{ github.workspace }}
run: |
cd ${{ github.workspace }}/decisionengine_modules
pytest -m flake8 --flake8 --log-level=WARNING
run_pylint:
name: Run pylint against code tree
runs-on: ubuntu-latest
steps:
- name: checkout DE Modules
uses: actions/checkout@v3
with:
path: decisionengine_modules
- name: checkout DE Framework
uses: actions/checkout@v3
with:
path: decisionengine
repository: HEPCloud/decisionengine
- name: checkout GlideinWMS for python3
uses: actions/checkout@v3
with:
path: glideinwms
repository: glideinWMS/glideinwms
ref: branch_v3_9
- uses: actions/setup-python@v4
with:
python-version: "3.9"
architecture: "x64"
- name: Cache pip
uses: actions/cache@v3
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Note Python version/implementation
run: |
which python3
python3 -c 'import sys; print(sys.version)'
python3 -c 'import platform; print(platform.python_implementation())'
python3 -m pip cache dir
- name: Install dependencies for GlideinWMS
run: |
set -x
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip install -r ${{ github.workspace }}/glideinwms/requirements.txt
- name: Install dependencies for DE Framework
run: |
set -x
cd ${{ github.workspace }}/decisionengine
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade wheel
python3 -m pip install --upgrade pytest
python3 -m pip install --user Cython
python3 -m pip install --user numpy
python3 setup.py bdist_wheel
python3 -m pip install --user dist/decisionengine*.whl
- name: Install DE Modules dependencies
run: |
set -x
cd ${{ github.workspace }}/decisionengine_modules
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pytest
python3 -m pip install -e .[develop] --user
python3 -m pip list --user
- name: Run pylint against the code tree
env:
PYTHONPATH: ${{ github.workspace }}/decisionengine_modules/src:${{ github.workspace }}/../:${{ github.workspace }}
run: |
cd ${{ github.workspace }}/decisionengine_modules
pylint src/decisionengine_modules/
license-check:
name: Run REUSE to check license compliance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: fsfe/reuse-action@v1