ioos / glider-dac

The IOOS Glider DAC site/scripts/tools
http://gliders.ioos.us/providers/
7 stars 13 forks source link

py.test GitHub Actions draft #328

Closed benjwadams closed 2 months ago

benjwadams commented 2 months ago
benjwadams commented 2 months ago

@ocefpaf, haven't really tried moving over GitHub Actions runners to Docker with py.test. Please let me know if there's a better way to do this -- I think this is alright and we need a few executables like ncgen, which could still be installed via Ubuntu, etc.

benjwadams commented 2 months ago

PS, we have some "expected" failures as part of the tests. Flat line is firing off some bad values and I'm not sure whether it's an ioos_qc thing or related to the config we have right now.

cc: @leilabbb

benjwadams commented 2 months ago

I'm not an expert on Docker+GHA but LGTM. Just two minor questions/suggestion:

  1. We could streamline the image creation by providing one that is ready for testing instead of installing packages in the base image every run. That way we could version the image and have more control over it.
  2. Are you pushing this image somewhere in the Travis-CI setup? If so, I know that there are GHA actions that help with that but I never used them. I can look them up later.

1) There was a Dockerfile.test file removed here. It was using an older version of Python, but it's possible we could resurrect that file and get a working build for test.

2) I think this is just local filesystem cache -- most times a rebuild would be necessary anyways, but pushing somewhere might benefit from Docker caching. I'm also curious if the build step could be referenced by several other steps and/or GHA YAML files.