diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 683e853abc..3c35a16ff1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,6 +60,42 @@ test:ant: - merge_requests - tags +test:javadoc: + stage: test + image: debian:unstable-slim + variables: + SCALA: https://downloads.lightbend.com/scala/2.12.13/scala-2.12.13.deb + LIBPREFIX: /usr/share/scala/lib + LIB_SCALATEST: https://repo1.maven.org/maven2/org/scalatest/scalatest_2.12/3.0.4/scalatest_2.12-3.0.4.jar + LIB_SCALACTIC: https://repo1.maven.org/maven2/org/scalactic/scalactic_2.12/3.0.4/scalactic_2.12-3.0.4.jar + before_script: + # Fix bug installing openjdk-11-jdk-headless's manuals + - mkdir -p /usr/share/man/man1/ + - apt-get update -q + - apt-get install -y wget gettext + ant openjdk-21-jdk-headless + libmockito-java libhamcrest-java junit4 + # Install specific version of scala + - wget -qO scala.deb "${SCALA}" + - dpkg -i scala.deb + # link to the scala libs with the name `ant test` expects + - ln -s "${LIBPREFIX}/scala-xml_2.12-1.0.6.jar" "${LIBPREFIX}/scala-xml.jar" + # Download required scala libs + - wget -qO "${LIBPREFIX}/scalactic.jar" "${LIB_SCALACTIC}" + - wget -qO "${LIBPREFIX}/scalatest.jar" "${LIB_SCALATEST}" + # Point ant to the right directories + - echo scalatest.libs=/usr/share/scala/lib > override.properties + - echo junit.home=/usr/share/java >> override.properties + - echo hamcrest.home=/usr/share/java >> override.properties + - echo mockito.home=/usr/share/java >> override.properties + - echo build.built-by=GitHub Actions >> override.properties + script: + - ant javadoc + only: + - master + - merge_requests + - tags + # Make sure we can build a docker image # It's cached for later jobs build_docker: