Skip to content
Snippets Groups Projects
Commit 74d5b21f authored by Mathieu Porras's avatar Mathieu Porras
Browse files

Merge branch '3-fix_permission_on_reports_directory' into 'master'

fix: permission on reports directory

Closes #3

See merge request to-be-continuous/python!1
parents 6c9a6c0e 8607071c
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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