Skip to content
Snippets Groups Projects
Commit 4e4018e0 authored by František Řezníček's avatar František Řezníček
Browse files

Update .gitlab-ci.yml file

parent 7cc0a52d
No related branches found
No related tags found
No related merge requests found
Pipeline #404600 waiting for manual action
......@@ -6,13 +6,15 @@ image: registry.gitlab.ics.muni.cz:443/cloud/g2/common-cloud-entities:1.0.2
pylint:
stage: test
variables:
MIN_PYLINT_RATING: "8.0"
before_script:
- python3 -m pip install -r ci/requirements.pip > pymodules-install.log
script:
- pylint --exit-zero --max-line-length 200 ci/*.py &> pylint.log
- grep 'Your code has been rated' pylint.log
- rank=$(grep 'Your code has been rated' pylint.log | grep -Eo '[0-9]+(\.[0-9]+)?' | head -1)
- awk -v "rank=${rank}" -v "min_rank=9.0" 'BEGIN{ if(rank<min_rank){exit(126)} }'
- rating=$(grep 'Your code has been rated' pylint.log | grep -Eo '[0-9]+(\.[0-9]+)?' | head -1)
- awk -v "r=${rating}" -v "min_r=${MIN_PYLINT_RATING}" 'BEGIN{ if(r<min_r){exit(126)} }'
artifacts:
expire_in: 1 mo
when: always
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment