forked from EsupPortail/esup-publisher
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
82 lines (73 loc) · 2.66 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
language: java
services:
- docker
matrix:
fast_finish: true
include:
- os: linux
#dist: trusty
jdk: openjdk8
- os: linux
#dist: trusty
jdk: openjdk11
addons:
apt:
packages:
- language-pack-fr
env:
global:
- LANG=fr_FR.UTF-8
- LC_ALL=fr_FR.UTF-8
- LANGUAGE=fr_FR.UTF-8
- LC_CTYPE=fr_FR.UTF-8
- TZ=Europe/Paris
cache:
directories:
- $HOME/.m2/repository
- $HOME/.npm/
sudo: required
before_install:
- docker-compose version
- export TEST_DIR=`pwd`; echo $TEST_DIR
# install for mariadb
- sudo service mysql stop
- sudo apt-get remove mysql-server* mysql-common libmysqlclient*
- sudo apt-get update
- sudo apt-get install mariadb-client net-tools
- cd .. && git clone https://github.com/GIP-RECIA/docker-mariadb.git && cd docker-mariadb
- docker-compose pull && docker-compose build
- MYSQL_ROOT_PASSWORD=root MYSQL_DATABASE=publisher_test MYSQL_HOST=db MYSQL_USER=myuser MYSQL_PASSWORD=secret MYSQL_USER_HOST=% docker-compose up --build -d
# install for openldap
- cd .. && git clone https://github.com/GIP-RECIA/docker-openldap-test.git && cd docker-openldap-test
- docker-compose pull && docker-compose build
- docker-compose up -d
# test for running services
- sleep 10
- docker ps -a
- docker inspect -f '{{.State.Health.Status}}' mariadb-strict
- mysql --port 3306 -h 127.0.0.1 -u root -proot -e "show databases;"
- mysql --port 3306 -h 127.0.0.1 -u root -proot -e "drop database if exists publisher_test; create database publisher_test DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;"
- mkdir $HOME/tmp
- cd $TEST_DIR && pwd
- env
- ./mvnw --version
before_script:
- ./mvnw clean generate-sources -Ptravis -B
- ./mvnw compile liquibase:update -Ptravis -B
# apply Database fix in waiting a management of "perm" not null and "perm" is null in abstract way
- mysql --port 3306 -h 127.0.0.1 -u root -proot -e "ALTER TABLE publisher_test.t_permission CHANGE perm perm VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NULL;"
# install npm
- npm install -g bower
- npm install -g yo@1.3.2
- npm install requirejs@2.1
- npm install jasmine-core@2.4.1
- bower install
script:
- |
if [ "$TRAVIS_JDK_VERSION" = 'openjdk8' ]; then
# plugin not available in jdk11
./mvnw notice:check
fi
- ./mvnw license:check
- ./mvnw test -Ptravis -Dspring.profiles.active=test -Dapp.upload.path=$HOME/tmp -Dapp.upload.protectedPath=$HOME/tmp -Dspring.jpa.show-sql=false -Dlogging.config=classpath:logback-travis.xml -B
- ./mvnw clean package -P prod -Dmaven.test.skip=true -Darguments="-DskipTests -Dmaven.deploy.skip=true"