DSEGOG-300 Add mongoimport back to GitHub Actions #97
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the introduction of running tests on Python 3.10 & 3.11, Ubuntu 22.04 runners need to be used. In these runners, Ubuntu have removed mongodb from being installed in 22.04, hence the Actions runner image also not having it. We use the
supercharge/mongodb-github-action@1.7.0
action to start the database as they are "available from within the MongoDB docker container. But not directly on the 22.04 host" (supercharge/mongodb-github-action#39 (comment)).Someone has found a solution to install
mongosh
on their CI (see actions/runner-images#6626 (comment)) and I've adapted their commands to installmongoimport
instead). I've made use ofmongoimport
in theingest_hdf.py
script as it serves as a good test that it works. I haven't entirely reverted Patrick's work (i.e. go back to running the command separately from the script) as I think it's better to keep it in the script (less commands that the developer needs to run) and the simulated data script will import the test users so it's nice to keep them consistent where possible.