-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.39 KB
/
pylint.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
name: Pylint
on: [push]
jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pylint
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pylint
- name: Analysing the code with pylint
run: |
pylint --rcfile=.pylintrc --disable=import-error --output-format=text $(git ls-files '*.py') | tee .pylint.txt
- name: Handle pylint results
run: |
score=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' .pylint.txt)
echo "Pylint score was $score"
color=$(python github_actions/pylint_manager.py --score=$score --score_min=8.0)
echo "PYLINT_COLOR=$color"
echo "PYLINT_COLOR=$color" >> $GITHUB_ENV
echo "PYLINT_SCORE=$score/10.00"
echo "PYLINT_SCORE=$score/10.00" >> $GITHUB_ENV
- name: Create Pylint Badge
uses: schneegans/dynamic-badges-action@v1.1.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 106c646ac67294657bccf02bbe22208f
filename: gan_facies_modeling_pylint.json
label: Pylint
message: ${{ env.PYLINT_SCORE }}
color: ${{ env.PYLINT_COLOR }}
style: flat
namedLogo: github
logoColor: '#959DA5'
labelColor: '#343B42'