Closed ferenc-hechler closed 1 month ago
The Service-Inventroy-Client used in the #289 contains unit tests. Those are executed in an own docker image built from DockerfileTest. The report is stored in junit xml format. The report is published using the action-junit-report GitHub action: https://github.com/tmforum-oda/oda-canvas/actions/runs/10893394963
Documentation How-To work with Dockerimages has to be updated.
Resource for testing before pushing: https://docs.docker.com/build/ci/github-actions/test-before-push/
Resource for testing before pushing: https://docs.docker.com/build/ci/github-actions/test-before-push/
There is an issue with this. When using buildx, the locally exportet image is not used in the FROM of DockerfileTest, instead of the latest pushed image is used, which leads to failing tests.
Details can be found here: https://github.com/docker/build-push-action/issues/1015
I solved this by pushing the :latest image, but not the version in the first build and then run the tests. the scond build (with arm64) uses the already cached amd64 build.
Description
The automated docker build process should be improved, so that unit tests can be executed as part of the build. Only for successful tests the docker image should be pushed to the repository.