Repository navigation
Run unit tests in CircleCI - #27
Conversation
* Rather than chown of /usr/local, less messing with environment.
* Can be installed when ssh in to fix, and otherwise have to install it for every job in the workflow.
* Not using virtual environments.
89f1e4a to
2e5b383
Compare
* This also made CI fail, since not installing SpacePy in test.
* This can sometimes provide more clues about how a test failed, or what test raised a warning.
|
Once this is merged I'll update the checks to explicitly require the unittest and postgres jobs to succeed in order to merge, but until this is merged that would block any other merges :) |
|
CircleCI reports out both the succes of the entire workflow, and the success of each individual job. Right now I have both workflow and the "build" job required in order to merge ("build" because that was the only job in the initial setup.) Reasonable options would be:
Regardless of what is required all get reported out in the PR, so you can see which job failed if the workflow failed. You can see above that "4 successful checks" are listed, and only the workflow (main) and the build job have the "required" tag. |
dnadeau-lanl
left a comment
There was a problem hiding this comment.
Thanks for this! I am very happy to see your tests running successfully in circleci!
|
Thanks. I set up the master branch protection rule to require the workflow to pass and not care about individual jobs. (I also set up a default branch protection rule to make it really hard to push to other branches, since PRs should normally be submitted from forks...we can revisit that later.) |
This PR sets up unit testing in CircleCI.
It documents the basic CircleCI/GitHub setup, for configuration which isn't in the .yaml (Closes #16).
It splits the build and the tests into separate jobs: the build which installs most dependencies and dbprocessing itself, the postgres test which installs the necessary postgres tools and creates the postgres db, and the unittest job which runs the unit tests (Closes #15). It uses workspace persistence to carry .local across (which catches all the Python installs, basically.)
It also clears out a few things we aren't currently using:
This doesn't do any caching at this point...I wanted to get the basic setup running. But in the future some level of caching the pip installs might be useful.
Draft for now until I can be sure the tests actually work....
PR Checklist
See issue #orCloses #)