diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml index 26b314198ff401ee60f7860c88cbf8e6a43b93cb..da5756cd23ef013583ddd897515f92dd1c31a992 100644 --- a/templates/gitlab-ci-python.yml +++ b/templates/gitlab-ci-python.yml @@ -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: @@ -399,6 +401,7 @@ py-unittest: stage: build script: - mkdir -p reports + - chmod o+rwx reports - install_requirements - install_test_requirements # code coverage @@ -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+\%)$/ @@ -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: @@ -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 @@ -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