A Bats testing framework image.
COPY --from=grayhemp/bats /usr/local /usr/local
For a build-time testing use the following in your test image
COPY test /mnt/test
RUN bats /mnt/test
and build it to trigger the tests. Note that it might be beneficial for immutable tests (like unit tests) due to caching.
For a run-time testing mount /mnt/test
to the test image and use
ENTRYPOINT bats
CMD /mnt/test
to invoke the tests when the container is started.
Relies on grayhemp/container-build for image build and push steps.
make
make push