Skip to content
Snippets Groups Projects
Commit 9dbfb4ba authored by Piotr Gawron's avatar Piotr Gawron
Browse files

test for java 11

parent 4b0b3c24
No related branches found
No related tags found
1 merge request!862Resolve "make code compatible with java 11"
Pipeline #12118 failed
This commit is part of merge request !862. Comments created here will be created in the context of that merge request.
...@@ -10,7 +10,7 @@ variables: ...@@ -10,7 +10,7 @@ variables:
POSTGRES_USER: map_viewer POSTGRES_USER: map_viewer
POSTGRES_PASSWORD: "123qweasdzxc" POSTGRES_PASSWORD: "123qweasdzxc"
test_frontend: test:frontend:
stage: test stage: test
coverage: '/Statements[:\ ]+(\d+.\d+)\%/' coverage: '/Statements[:\ ]+(\d+.\d+)\%/'
script: script:
...@@ -18,11 +18,22 @@ test_frontend: ...@@ -18,11 +18,22 @@ test_frontend:
- npm install - npm install
- npm test - npm test
test_backend commons: .jdk_8_template: &jdk_8_definition
image: maven:3.6.0-jdk-8 image: maven:3.6.0-jdk-8
services:
- postgres:9.6
stage: test stage: test
coverage: '/(\d+.\d+) \% covered/' coverage: '/(\d+.\d+) \% covered/'
script:
.jdk_11_template: &jdk_11_definition
image: maven:3.6.0-jdk-11
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
.test_backend_commons_template:
script: &test_backend_commons_definition
#xvfb is for X11 connection used by some parts of the java code: https://stackoverflow.com/a/47575851/1127920 #xvfb is for X11 connection used by some parts of the java code: https://stackoverflow.com/a/47575851/1127920
- apt-get update - apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y xvfb - DEBIAN_FRONTEND=noninteractive apt-get install -y xvfb
...@@ -33,13 +44,8 @@ test_backend commons: ...@@ -33,13 +44,8 @@ test_backend commons:
- mvn test -pl commons - mvn test -pl commons
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' commons/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' commons/target/site/jacoco/jacoco.csv
test_backend annotation: .test_backend_annotation_template:
image: maven:3.6.0-jdk-8 script: &test_backend_annotation_definition
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mkdir /etc/minerva/ - mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties - cp test-db-ci.properties /etc/minerva/db.properties
...@@ -47,11 +53,9 @@ test_backend annotation: ...@@ -47,11 +53,9 @@ test_backend annotation:
- mvn test -pl annotation - mvn test -pl annotation
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' annotation/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' annotation/target/site/jacoco/jacoco.csv
test_backend CellDesigner-plugin:
image: maven:3.6.0-jdk-8 .test_backend_CellDesigner-plugin_template:
stage: test script: &test_backend_CellDesigner_plugin_definition
coverage: '/(\d+.\d+) \% covered/'
script:
#xvfb is for X11 connection used by some parts of the java code: https://stackoverflow.com/a/47575851/1127920 #xvfb is for X11 connection used by some parts of the java code: https://stackoverflow.com/a/47575851/1127920
- apt-get update - apt-get update
- apt-get install -y xvfb - apt-get install -y xvfb
...@@ -62,115 +66,74 @@ test_backend CellDesigner-plugin: ...@@ -62,115 +66,74 @@ test_backend CellDesigner-plugin:
- mvn test -pl CellDesigner-plugin - mvn test -pl CellDesigner-plugin
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' CellDesigner-plugin/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' CellDesigner-plugin/target/site/jacoco/jacoco.csv
test_backend converter: .test_backend_converter_template:
image: maven:3.6.0-jdk-8 script: &test_backend_converter_definition
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mvn -DskipTests=true clean install -pl converter -am - mvn -DskipTests=true clean install -pl converter -am
- mvn test -pl converter - mvn test -pl converter
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter/target/site/jacoco/jacoco.csv
test_backend converter-graphics: .test_backend_converter_graphics_template:
image: maven:3.6.0-jdk-8 script: &test_backend_converter_graphics_definition
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mvn -DskipTests=true clean install -pl converter-graphics -am - mvn -DskipTests=true clean install -pl converter-graphics -am
- mvn test -pl converter-graphics - mvn test -pl converter-graphics
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-graphics/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-graphics/target/site/jacoco/jacoco.csv
test_backend converter-CellDesigner: .test_backend_converter_CellDesigner_template:
image: maven:3.6.0-jdk-8 script: &test_backend_converter_CellDesigner_definition
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mvn -DskipTests=true clean install -pl converter-CellDesigner -am - mvn -DskipTests=true clean install -pl converter-CellDesigner -am
- mvn test -pl converter-CellDesigner - mvn test -pl converter-CellDesigner
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-CellDesigner/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-CellDesigner/target/site/jacoco/jacoco.csv
test_backend converter-SBGN-ML: .test_backend_converter_SBGNML_template:
image: maven:3.6.0-jdk-8 script: &test_backend_converter_SBGNML_definition
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mkdir /etc/minerva/ - mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties - cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl converter-SBGNML -am - mvn -DskipTests=true clean install -pl converter-SBGNML -am
- mvn test -pl converter-SBGNML - mvn test -pl converter-SBGNML
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-SBGNML/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-SBGNML/target/site/jacoco/jacoco.csv
test_backend converter-SBML: .test_backend_converter_SBML_template:
image: maven:3.6.0-jdk-8 script: &test_backend_converter_SBML_definition
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mvn -DskipTests=true clean install -pl converter-sbml -am - mvn -DskipTests=true clean install -pl converter-sbml -am
- mvn test -pl converter-sbml - mvn test -pl converter-sbml
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-sbml/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' converter-sbml/target/site/jacoco/jacoco.csv
test_backend model: .test_backend_model_template:
image: maven:3.6.0-jdk-8 script: &test_backend_model_definition
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mvn -DskipTests=true clean install -pl model -am - mvn -DskipTests=true clean install -pl model -am
- mvn test -pl model - mvn test -pl model
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' model/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' model/target/site/jacoco/jacoco.csv
test_backend model-command: .test_backend_model_command_template:
image: maven:3.6.0-jdk-8 script: &test_backend_model_command_definition
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mvn -DskipTests=true clean install -pl model-command -am - mvn -DskipTests=true clean install -pl model-command -am
- mvn test -pl model-command - mvn test -pl model-command
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' model-command/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' model-command/target/site/jacoco/jacoco.csv
test_backend pathvisio: .test_backend_pathvisio_template:
image: maven:3.6.0-jdk-8 script: &test_backend_pathvisio_definition
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mvn -DskipTests=true clean install -pl pathvisio -am - mvn -DskipTests=true clean install -pl pathvisio -am
- mvn test -pl pathvisio - mvn test -pl pathvisio
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' pathvisio/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' pathvisio/target/site/jacoco/jacoco.csv
test_backend persist: .test_backend_persist_template:
image: maven:3.6.0-jdk-8 script: &test_backend_persist_definition
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mkdir /etc/minerva/ - mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties - cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl persist -am - mvn -DskipTests=true clean install -pl persist -am
- mvn test -pl persist - mvn test -pl persist
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' persist/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' persist/target/site/jacoco/jacoco.csv
test_backend rest-api: .test_backend_rest_template:
image: maven:3.6.0-jdk-8 script: &test_backend_rest_definition
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mkdir /etc/minerva/ - mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties - cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl rest-api -am - mvn -DskipTests=true clean install -pl rest-api -am
- mvn test -pl rest-api - mvn test -pl rest-api
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' rest-api/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' rest-api/target/site/jacoco/jacoco.csv
test_backend web: .test_backend_web_template:
image: maven:3.6.0-jdk-8 script: &test_backend_web_definition
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- apt-get update - apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y curl gnupg git ant - DEBIAN_FRONTEND=noninteractive apt-get install -y curl gnupg git ant
- curl -sL https://deb.nodesource.com/setup_9.x | bash - - curl -sL https://deb.nodesource.com/setup_9.x | bash -
...@@ -181,19 +144,127 @@ test_backend web: ...@@ -181,19 +144,127 @@ test_backend web:
- mvn test -pl web - mvn test -pl web
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' web/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' web/target/site/jacoco/jacoco.csv
test_backend service: .test_backend_service_template:
image: maven:3.6.0-jdk-8 script: &test_backend_service_definition
services:
- postgres:9.6
stage: test
coverage: '/(\d+.\d+) \% covered/'
script:
- mkdir /etc/minerva/ - mkdir /etc/minerva/
- cp test-db-ci.properties /etc/minerva/db.properties - cp test-db-ci.properties /etc/minerva/db.properties
- mvn -DskipTests=true clean install -pl service -am - mvn -DskipTests=true clean install -pl service -am
- mvn test -pl service - mvn test -pl service
- awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' service/target/site/jacoco/jacoco.csv - awk -F"," '{ instructions += $4 + $5; covered += $5 } END { print covered, "/", instructions, "instructions covered"; print 100*covered/instructions,"% covered" }' service/target/site/jacoco/jacoco.csv
test:backend:commons:jdk-8:
<<: *jdk_8_definition
script: *test_backend_commons_definition
test:backend:commons:jdk-11:
<<: *jdk_11_definition
script: *test_backend_commons_definition
test:backend:annotation:jdk-8:
<<: *jdk_8_definition
script: *test_backend_annotation_definition
test:backend:annotation:jdk-11:
<<: *jdk_11_definition
script: *test_backend_annotation_definition
test:backend:CellDesigner_plugin:jdk-8:
<<: *jdk_8_definition
script: *test_backend_CellDesigner_plugin_definition
test:backend:CellDesigner_plugin:jdk-11:
<<: *jdk_11_definition
script: *test_backend_CellDesigner_plugin_definition
test:backend:converter:jdk-8:
<<: *jdk_8_definition
script: *test_backend_converter_definition
test:backend:converter:jdk-11:
<<: *jdk_11_definition
script: *test_backend_converter_definition
test:backend:converter_graphics:jdk-8:
<<: *jdk_8_definition
script: *test_backend_converter_graphics_definition
test:backend:converter_graphics:jdk-11:
<<: *jdk_11_definition
script: *test_backend_converter_graphics_definition
test:backend:converter_SBGNML:jdk-8:
<<: *jdk_8_definition
script: *test_backend_converter_SBGNML_definition
test:backend:converter_SBGNML:jdk-11:
<<: *jdk_11_definition
script: *test_backend_converter_SBGNML_definition
test:backend:converter_SBML:jdk-8:
<<: *jdk_8_definition
script: *test_backend_converter_SBML_definition
test:backend:converter_SBML:jdk-11:
<<: *jdk_11_definition
script: *test_backend_converter_SBML_definition
test:backend:model:jdk-8:
<<: *jdk_8_definition
script: *test_backend_model_definition
test:backend:model:jdk-11:
<<: *jdk_11_definition
script: *test_backend_model_definition
test:backend:model_command:jdk-8:
<<: *jdk_8_definition
script: *test_backend_model_command_definition
test:backend:model_command:jdk-11:
<<: *jdk_11_definition
script: *test_backend_model_command_definition
test:backend:pathvisio:jdk-8:
<<: *jdk_8_definition
script: *test_backend_pathvisio_definition
test:backend:pathvisio:jdk-11:
<<: *jdk_11_definition
script: *test_backend_pathvisio_definition
test:backend:persist:jdk-8:
<<: *jdk_8_definition
script: *test_backend_persist_definition
test:backend:persist:jdk-11:
<<: *jdk_11_definition
script: *test_backend_persist_definition
test:backend:rest:jdk-8:
<<: *jdk_8_definition
script: *test_backend_rest_definition
test:backend:rest:jdk-11:
<<: *jdk_11_definition
script: *test_backend_rest_definition
test:backend:service:jdk-8:
<<: *jdk_8_definition
script: *test_backend_service_definition
test:backend:service:jdk-11:
<<: *jdk_11_definition
script: *test_backend_service_definition
test:backend:web:jdk-8:
<<: *jdk_8_definition
script: *test_backend_web_definition
test:backend:web:jdk-11:
<<: *jdk_11_definition
script: *test_backend_web_definition
build_war: build_war:
image: maven:3.6.0-jdk-8 image: maven:3.6.0-jdk-8
stage: build stage: build
...@@ -213,18 +284,7 @@ build_war: ...@@ -213,18 +284,7 @@ build_war:
- ant maven-build - ant maven-build
- cp web/target/web-1.0.war minerva.war - cp web/target/web-1.0.war minerva.war
java_11_compatibility: test:dependency_conflict:
image: maven:3.6-jdk-11
stage: test
script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y curl gnupg git ant
- curl -sL https://deb.nodesource.com/setup_9.x | bash -
- DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs
- mvn clean install -DskipTests=true
dependency_conflict_check:
image: maven:3.6.0-jdk-8 image: maven:3.6.0-jdk-8
stage: test stage: test
script: script:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment