diff --git a/.cirrus.yml b/.cirrus.yml index 477f2cf2..9af8fa15 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -4,4 +4,4 @@ container: memory: 4 test_task: - script: sh ./mvnw clean test + script: sh ./mvnw clean test -Pembed-linux,metrics diff --git a/.travis.yml b/.travis.yml index dcbcc252..7bc3ba0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ before_install: after_success: - bash <(curl -s https://codecov.io/bash) -script: "./mvnw clean test -Pcoverage -B" +script: "./mvnw clean test -Pembed-linux,metrics,coverage -B" cache: directories: diff --git a/DEPLOY.md b/DEPLOY.md index ea071343..06155da1 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -5,7 +5,7 @@ First, go to project's root and make the `do.sh` utility script executable: `chm ### Manually -* Install **JDK8** and **MongoDB 3.4**+. MongoDB should listen on port 27017, accept username `root` and password `woot` on the `manondev` database (authentication and data). See `src/main/resources/application-dev.yml` for details. +* Install **JDK8** and **MongoDB 4.0.x** (it should work with any version from 3.4.x to 4.1.x). MongoDB should listen on port 27017, with no authentication. See `src/main/resources/application-dev.yml` for details. * Package and run application via `do rd`. Application will start on port 8080 with `dev` Spring profile. * To run with another Spring profile (e.g. `prod`), package application via `do p`, go to `target/` directory and run `java -jar -Xms128m -Xmx512m -Dspring.profiles.active=prod,metrics manon.jar`. diff --git a/appveyor.yml b/appveyor.yml index 554ee95e..a6ea505f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -15,7 +15,7 @@ build_script: - mvnw clean package -DskipTests test_script: - - mvnw test + - mvnw test -Pembed-win,metrics cache: - C:\Users\appveyor\.m2 diff --git a/do.cmd b/do.cmd index 9a643867..cca5fddb 100644 --- a/do.cmd +++ b/do.cmd @@ -19,11 +19,11 @@ if [%1] == [help] ( if [%1] == [t] ( echo mvnw clean test - mvnw clean test + mvnw clean test -Pembed-win ) if [%1] == [tc] ( echo mvnw clean test -Pcoverage - mvnw clean test -Pcoverage + mvnw clean test -PPembed-win,coverage ) if [%1] == [b] ( echo mvnw clean compile -DskipTests -T1 @@ -54,11 +54,11 @@ if [%1] == [w] ( ) if [%1] == [cv] ( echo mvnw versions:display-property-updates -U -P coverage,jib - mvnw versions:display-property-updates -U -P coverage,jib + mvnw versions:display-property-updates -U -P coverage,jib,embed-win ) if [%1] == [uv] ( echo mvnw versions:update-properties -U -P coverage,jib - mvnw versions:update-properties -U -P coverage,jib + mvnw versions:update-properties -U -P coverage,jib,embed-win ) if [%1] == [dt] ( echo mvnw dependency:tree diff --git a/do.sh b/do.sh index 3685e81d..6c30be03 100644 --- a/do.sh +++ b/do.sh @@ -23,12 +23,12 @@ case "$1" in "t") echo "sh ./mvnw clean test" - sh ./mvnw clean test + sh ./mvnw clean test -Pembed-linux ;; "tc") echo "sh ./mvnw clean test -Pcoverage" - sh ./mvnw clean test -Pcoverage + sh ./mvnw clean test -Pembed-linux,coverage ;; "b") @@ -65,12 +65,12 @@ case "$1" in "cv") echo "sh ./mvnw versions:display-property-updates -U -P coverage,jib" - sh ./mvnw versions:display-property-updates -U -P coverage,jib + sh ./mvnw versions:display-property-updates -U -P coverage,jib,embed-linux ;; "uv") echo "sh ./mvnw versions:update-properties -U -P coverage,jib" - sh ./mvnw versions:update-properties -U -P coverage,jib + sh ./mvnw versions:update-properties -U -P coverage,jib,embed-linux ;; "dt") diff --git a/docker-compose.yml b/docker-compose.yml index 574a3350..2705aaac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: # database mongo: container_name: mongo - image: mongo:3.4-jessie + image: mongo:4.0.3-xenial command: --smallfiles --logpath=/dev/null ports: - "27017:27017" diff --git a/pom.xml b/pom.xml index e8844f89..f50a1bd5 100644 --- a/pom.xml +++ b/pom.xml @@ -16,10 +16,8 @@ 1.8 UTF-8 UTF-8 - - -ea -Xms128m -Xmx256m -Dspring.profiles.active=test,metrics -Dfile.encoding=UTF-8 - -Djava.awt.headless=true -XX:TieredStopAtLevel=1 -noverify - + -ea -Xms128m -Xmx256m -Dfile.encoding=UTF-8 -Djava.awt.headless=true -XX:TieredStopAtLevel=1 -noverify + -Dspring.profiles.active=test,metrics 2.1.1 3.0.10 @@ -38,7 +36,6 @@ 3.8.0 2.22.1 2.7 - @@ -172,12 +169,6 @@ ${mockito-core.version} test - - de.flapdoodle.embed - de.flapdoodle.embed.mongo - ${embed.mongo.version} - test - @@ -245,7 +236,7 @@ maven-surefire-plugin ${maven-surefire-plugin.version} - ${surefireArgLine} + ${surefireArgLine} ${profileArgLine} ${project.build.directory} @@ -263,6 +254,37 @@ + + + + embed-linux + + -Dspring.profiles.active=test-embed-linux,metrics + + + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + ${embed.mongo.version} + test + + + + + embed-win + + -Dspring.profiles.active=test-embed-win,metrics + + + + de.flapdoodle.embed + de.flapdoodle.embed.mongo + ${embed.mongo.version} + test + + + + coverage @@ -318,13 +340,14 @@ ${maven-surefire-plugin.version} - ${surefireArgLine} ${coverageSurefireArgLine} + ${surefireArgLine} ${profileArgLine} ${coverageSurefireArgLine} ${project.build.directory} + jib @@ -362,6 +385,7 @@ +