Skip to content

Commit 7c9b061

Browse files
Merge pull request #158 from guzman-raphael/travis2
Add Travis CI
2 parents ee7b73e + 6f9ef91 commit 7c9b061

File tree

3 files changed

+76
-1
lines changed

3 files changed

+76
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
*.m~
22
mym/
33
*.mltbx
4-
*.env
4+
*.env

.travis.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
sudo: required
2+
services:
3+
- docker
4+
env:
5+
global:
6+
- DOCKER_CLIENT_TIMEOUT: 120
7+
- COMPOSE_HTTP_TIMEOUT: 120
8+
- MATLAB_USER: muser
9+
- MATLAB_UID: 2000
10+
- MATLAB_GID: 2000
11+
slim: &slim
12+
stage: Slim9.9
13+
os: linux
14+
language: shell
15+
script:
16+
- license=MATLAB_LICENSE_${MATLAB_VERSION}
17+
- export MATLAB_LICENSE=$(eval echo "\$$license")
18+
- docker-compose -f LNX-docker-compose.yml up --exit-code-from dj
19+
jobs:
20+
include:
21+
- <<: *slim
22+
env:
23+
- MATLAB_VERSION: R2018b
24+
- MYSQL_TAG: 8.0
25+
- <<: *slim
26+
env:
27+
- MATLAB_VERSION: R2018b
28+
- MYSQL_TAG: 5.7
29+
- <<: *slim
30+
env:
31+
- MATLAB_VERSION: R2018b
32+
- MYSQL_TAG: 5.6

LNX-docker-compose.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# docker-compose -f LNX-docker-compose.yml --env-file LNX.env up --build --exit-code-from dj
2+
version: '2.2'
3+
x-net: &net
4+
networks:
5+
- main
6+
services:
7+
dj:
8+
<<: *net
9+
environment:
10+
- DISPLAY
11+
- MATLAB_LICENSE
12+
- MATLAB_USER
13+
- DJ_HOST=mysql
14+
- DJ_USER=root
15+
- DJ_PASS=simple
16+
- DJ_TEST_HOST=mysql
17+
- DJ_TEST_USER=datajoint
18+
- DJ_TEST_PASSWORD=datajoint
19+
image: raphaelguzman/matlab:${MATLAB_VERSION}-MIN
20+
depends_on:
21+
mysql:
22+
condition: service_healthy
23+
user: ${MATLAB_UID}:${MATLAB_GID}
24+
working_dir: /src
25+
command: >
26+
/bin/bash -c "
27+
matlab -nodisplay -r \"\
28+
res=run(tests.Main);\
29+
disp(res);\
30+
if all([res.Passed]) exit, else exit(1), end;\
31+
\";
32+
"
33+
mac_address: $MATLAB_HOSTID
34+
volumes:
35+
- .:/src
36+
- /tmp/.X11-unix:/tmp/.X11-unix:rw
37+
mysql:
38+
<<: *net
39+
image: datajoint/mysql:${MYSQL_TAG}
40+
environment:
41+
- MYSQL_ROOT_PASSWORD=simple
42+
networks:
43+
main:

0 commit comments

Comments
 (0)