So in my circle.yml I call mkdir -p test-results/coverage test-results/nose
But when it gets to the step to store artifacts or test results, it can’t find the directory. The workaround I found was to create the directories and transfer them into my image in the Dockerfile with .gitkeep files in them so they will be added to source control.
This seems incorrect, why would it not be able to find the directories when I create them with mkdir? They’re on the same directory as the app and my config for nose and coverage are as follows:
In my settings.py:
NOSE_ARGS = [ '--with-coverage', '--cover-package=sasite', '--with-xunit', '--xunit-file=test-results/nose/noseresults.xml', '--verbosity=3' ]
and my coverage setup:
if settings.IS_TESTING: import coverage cov = coverage.coverage(source=['sasite'], omit=['*/tests/', '/logs/', '/test-results/*', '*/test-results/*', '*/*/locale/*', '*/locale/*', '*/migrations/*', '/my.conf/*', '/env1/*', '/venv/*', '/caches/*', '/.docker/*', '/.circleci/*', '/scripts/*']) cov.set_option('report:show_missing', True) cov.erase() cov.start() execute_from_command_line(sys.argv) if settings.IS_TESTING: cov.stop() cov.save() cov.html_report(directory='test-results/coverage/coveragehtml.html') cov.xml_report(outfile='test-results/coverage/coveragexml.xml') cov.report()
When I create the directory for test-results with .gitkeep locally, it does succeed in saving artifacts and test results, or so it says. But nothing shows up in the summary.