diff --git a/.gitignore b/.gitignore index c379efb..31e07fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ tests/**/results.json tests/**/.merlin.json +tests/**/*-junit-results.xml **/_build/ diff --git a/Dockerfile b/Dockerfile index ed50857..9ed0183 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,27 @@ -FROM ocaml/opam:alpine-3.18-ocaml-4.14-afl AS builder +FROM ocaml/opam:alpine-3.18-ocaml-5.2 AS builder +ENV PATH="/home/opam/.opam/5.2/bin:${PATH}" -RUN opam update \ - && opam install base core dune \ - calendar react \ - ounit ounit2 qcheck ezxmlm yojson \ - ppx_deriving -ENV PATH="/home/opam/.opam/4.14/bin:${PATH}" +# We purposefully don't combine the opam update and opam install steps +# to allow the opam update layer to be re-used in the runner image below +RUN opam update +RUN opam install dune yojson ezxmlm -COPY . . -WORKDIR ./runner -USER root +WORKDIR /opt/test-runner +COPY runner/ . RUN dune build -USER $CONTAINER_USER_ID -FROM ocaml/opam:alpine-3.18-ocaml-4.14-afl -WORKDIR /opt/test-runner +FROM ocaml/opam:alpine-3.18-ocaml-5.2 AS runner +ENV PATH="/home/opam/.opam/5.2/bin:${PATH}" -RUN opam update \ - && opam install dune ounit2 base qcheck react ppx_sexp_conv calendar ppx_deriving +RUN opam update +RUN opam install base ounit2 qcheck react calendar + +WORKDIR /opt/test-runner + +COPY --from=builder /opt/test-runner/_build/default/src/runner.exe bin/runner COPY . . -COPY --from=builder /home/opam/runner/_build/default/src/runner.exe bin/runner -ENV PATH="/home/opam/.opam/4.14/bin:${PATH}" + USER root ENTRYPOINT ["/opt/test-runner/bin/run.sh"] diff --git a/tests/example-empty-file/expected_results.json b/tests/example-empty-file/expected_results.json index a6845a2..e7b2ffb 100644 --- a/tests/example-empty-file/expected_results.json +++ b/tests/example-empty-file/expected_results.json @@ -1,6 +1,6 @@ { "version": 2, "status": "error", - "message": "File \"leap.ml\", line 1:\nError: The implementation leap.ml\n does not match the interface .test.eobjs/byte/leap.cmi: \n The value `leap_year' is required but not provided\n File \"leap.mli\", line 1, characters 0-26: Expected declaration\nmake: *** [Makefile:4: test] Error 1", + "message": "File \"leap.ml\", line 1:\nError: The implementation \"leap.ml\" does not match the interface \"leap.ml\": \n The value \"leap_year\" is required but not provided\n File \"leap.mli\", line 1, characters 0-26: Expected declaration\nmake: *** [Makefile:4: test] Error 1", "tests": null } \ No newline at end of file