]> kaliko git repositories - mpd-sima.git/blob - .gitlab/pylint.yml
Use duration instead of time in Track objects (closes #37)
[mpd-sima.git] / .gitlab / pylint.yml
1 pylint:
2   stage: test
3   image: python:3.7-slim
4   before_script:
5     - mkdir -p public/badges public/lint
6     - echo undefined > public/badges/$CI_JOB_NAME.score
7     - pip install pylint_gitlab
8   script:
9     - pylint --exit-zero --output-format=text sima | tee /tmp/pylint.txt
10     - sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' /tmp/pylint.txt > public/badges/$CI_JOB_NAME.score
11     - pylint --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter sima > codeclimate.json
12     - pylint --exit-zero --output-format=pylint_gitlab.GitlabPagesHtmlReporter sima > public/lint/index.html
13   after_script:
14     - anybadge --overwrite --label $CI_JOB_NAME --value=$(cat public/badges/$CI_JOB_NAME.score) --file=public/badges/$CI_JOB_NAME.svg 4=red 6=orange 8=yellow 10=green
15     - |
16       echo "Your score is: $(cat public/badges/$CI_JOB_NAME.score)"
17   artifacts:
18     expire_in: 30 days
19     paths:
20       - public
21     reports:
22       codequality: codeclimate.json
23     when: always
24