Loading templates/gitlab-ci-python.yml +7 −0 Original line number Diff line number Diff line Loading @@ -351,11 +351,13 @@ py-lint: then # failed: also generate codeclimate report mkdir -p reports chmod o+rwx reports pylint --ignore=.cache --output-format=pylint_gitlab.GitlabCodeClimateReporter ${PYLINT_ARGS} ${PYLINT_FILES:-$(find -type f -name "*.py")} > reports/pylint-codeclimate.json exit 1 else # success: generate empty codeclimate report (required by GitLab :( ) mkdir -p reports chmod o+rwx reports echo "[]" > reports/pylint-codeclimate.json fi artifacts: Loading Loading @@ -399,6 +401,7 @@ py-unittest: stage: build script: - mkdir -p reports - chmod o+rwx reports - install_requirements - install_test_requirements # code coverage Loading Loading @@ -433,6 +436,7 @@ py-pytest: - install_requirements - install_test_requirements - mkdir -p reports - chmod o+rwx reports - pip install -U pytest pytest-cov coverage - python -m pytest --junit-xml=reports/TEST-pytests.xml --cov --cov-report term --cov-report xml:reports/coverage.xml ${PYTEST_ARGS} coverage: /^TOTAL.+?(\d+\%)$/ Loading Loading @@ -460,6 +464,7 @@ py-nosetests: - install_requirements - install_test_requirements - mkdir -p reports - chmod o+rwx reports - nosetests --with-xunit --xunit-file=reports/TEST-nosetests.xml --with-coverage --cover-erase --cover-xml --cover-xml-file=reports/coverage.xml --cover-html --cover-html-dir=reports/coverage ${NOSETESTS_ARGS} coverage: /^TOTAL.+?(\d+\%)$/ artifacts: Loading Loading @@ -492,6 +497,7 @@ py-bandit: then # failed: also generate JSON report mkdir -p reports chmod o+rwx reports bandit ${TRACE+--verbose} --format json --output reports/bandit.json ${BANDIT_ARGS} exit 1 fi Loading Loading @@ -528,6 +534,7 @@ py-safety: then # failed: also generate JSON report mkdir -p reports chmod o+rwx reports pip freeze | safety check --stdin --json --output reports/safety.json ${SAFETY_ARGS} exit 1 fi Loading Loading
templates/gitlab-ci-python.yml +7 −0 Original line number Diff line number Diff line Loading @@ -351,11 +351,13 @@ py-lint: then # failed: also generate codeclimate report mkdir -p reports chmod o+rwx reports pylint --ignore=.cache --output-format=pylint_gitlab.GitlabCodeClimateReporter ${PYLINT_ARGS} ${PYLINT_FILES:-$(find -type f -name "*.py")} > reports/pylint-codeclimate.json exit 1 else # success: generate empty codeclimate report (required by GitLab :( ) mkdir -p reports chmod o+rwx reports echo "[]" > reports/pylint-codeclimate.json fi artifacts: Loading Loading @@ -399,6 +401,7 @@ py-unittest: stage: build script: - mkdir -p reports - chmod o+rwx reports - install_requirements - install_test_requirements # code coverage Loading Loading @@ -433,6 +436,7 @@ py-pytest: - install_requirements - install_test_requirements - mkdir -p reports - chmod o+rwx reports - pip install -U pytest pytest-cov coverage - python -m pytest --junit-xml=reports/TEST-pytests.xml --cov --cov-report term --cov-report xml:reports/coverage.xml ${PYTEST_ARGS} coverage: /^TOTAL.+?(\d+\%)$/ Loading Loading @@ -460,6 +464,7 @@ py-nosetests: - install_requirements - install_test_requirements - mkdir -p reports - chmod o+rwx reports - nosetests --with-xunit --xunit-file=reports/TEST-nosetests.xml --with-coverage --cover-erase --cover-xml --cover-xml-file=reports/coverage.xml --cover-html --cover-html-dir=reports/coverage ${NOSETESTS_ARGS} coverage: /^TOTAL.+?(\d+\%)$/ artifacts: Loading Loading @@ -492,6 +497,7 @@ py-bandit: then # failed: also generate JSON report mkdir -p reports chmod o+rwx reports bandit ${TRACE+--verbose} --format json --output reports/bandit.json ${BANDIT_ARGS} exit 1 fi Loading Loading @@ -528,6 +534,7 @@ py-safety: then # failed: also generate JSON report mkdir -p reports chmod o+rwx reports pip freeze | safety check --stdin --json --output reports/safety.json ${SAFETY_ARGS} exit 1 fi Loading