pygeoapi
pygeoapi copied to clipboard
GitHub Workflow for Docker build/push enhancements
Is your feature request related to a problem? Please describe. This concerns the GH Workflow containers.yml. Via #989 and PR #997 the Docker Build/Push is working but there are some 'dangling issues', at least two:
- the Unit Tests running using the Docker Image are commented out (also concerns/revives old/closed issues #148 and #848)
- looks like the Image is built twice (?), it is already a very heavy/long build
Describe the solution you'd like
- run the Unit Tests in Docker like
docker run --entrypoint "/entrypoint.sh" --rm geopython/pygeoapi:tag test
- If outcome of the tests is negative: Fail the Workflow, do not publish the Image (now it will chug along)
- See if Docker Image can be built only once (if really built twice)
Describe alternatives you've considered SOme projects see to use a GH Workflow Cron to test/analyze code Docker Images, but that would defeat Images already rolled out...
Additional context N.A.
containers.yml
won't run until the build stage (main.yml
) is complete and the testing therefore passed (https://github.com/geopython/pygeoapi/blob/master/.github/workflows/containers.yml#L11)
So we could potentially remove the testing of the built containers although I can understand why might want to include as a double check...
Yes, please also use the tests within the Container. The execution/version context is usually different from other execution contexts like local venvs and even the GH Workflow, this based on e.g. Ubuntu versions, non-pinned PyPi packages etc. Even timezones may matter. Plus the context within the container is more complete, e.g. it has GDAL, while this is not (yet) in the Build workflow (commented out). Though we should have reproducible builds, in practice this is very hard.
Is similar to #344 and now worked on in #1105 so I propose to close here as duplicate.
As per RFC4, this Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.
As per RFC4, this Issue has been closed due to there being no activity for more than 90 days.