|
1 | | -x-app: &app |
| 1 | +# unit tests in containerased env |
| 2 | +services: |
| 3 | + test-linux: |
2 | 4 | build: |
3 | 5 | context: . |
4 | 6 | args: |
5 | 7 | RUBY_VERSION: '3.2' |
6 | | - # Increase the version number in the image tag every time Dockerfile or its arguments is changed |
7 | | - image: ontologies_ld-dev:0.0.4 |
8 | | - environment: &env |
| 8 | + command: ["bash", "-lc", "bundle exec rake test"] |
| 9 | + environment: |
9 | 10 | COVERAGE: 'true' # enable simplecov code coverage |
10 | 11 | REDIS_HOST: redis-ut |
11 | | - REDIS_PORT: 6379 |
12 | | - SOLR_TERM_SEARCH_URL: http://solr-term-ut:8983/solr |
13 | | - SOLR_PROP_SEARCH_URL: http://solr-prop-ut:8983/solr |
14 | | - stdin_open: true |
15 | | - tty: true |
16 | | - command: /bin/bash |
17 | | - volumes: |
18 | | - # bundle volume for hosting gems installed by bundle; it speeds up gem install in local development |
19 | | - - bundle:/usr/local/bundle |
20 | | - - .:/app |
21 | | - # mount directory containing development version of the gems if you need to use 'bundle config local' |
22 | | - #- /Users/alexskr/ontoportal:/Users/alexskr/ontoportal |
23 | | - depends_on: &depends_on |
24 | | - solr-prop-ut: |
25 | | - condition: service_healthy |
26 | | - solr-term-ut: |
| 12 | + SOLR_TERM_SEARCH_URL: http://solr-ut:8983/solr |
| 13 | + SOLR_PROP_SEARCH_URL: http://solr-ut:8983/solr |
| 14 | + depends_on: |
| 15 | + solr-ut: |
27 | 16 | condition: service_healthy |
28 | 17 | redis-ut: |
29 | 18 | condition: service_healthy |
30 | | - |
31 | | -services: |
32 | | - # environment wtih 4store backend |
33 | | - ruby: |
34 | | - <<: *app |
35 | | - environment: |
36 | | - <<: *env |
37 | | - GOO_BACKEND_NAME: 4store |
38 | | - GOO_PORT: 9000 |
39 | | - GOO_HOST: 4store-ut |
40 | | - GOO_PATH_QUERY: /sparql/ |
41 | | - GOO_PATH_DATA: /data/ |
42 | | - GOO_PATH_UPDATE: /update/ |
43 | 19 | profiles: |
44 | | - - 4store |
45 | | - depends_on: |
46 | | - <<: *depends_on |
47 | | - 4store-ut: |
48 | | - condition: service_started |
49 | | - |
50 | | - # environment with AllegroGraph backend |
51 | | - ruby-agraph: |
52 | | - <<: *app |
53 | | - environment: |
54 | | - <<: *env |
55 | | - GOO_BACKEND_NAME: ag |
56 | | - GOO_PORT: 10035 |
57 | | - GOO_HOST: agraph-ut |
58 | | - GOO_PATH_QUERY: /repositories/ontoportal_test |
59 | | - GOO_PATH_DATA: /repositories/ontoportal_test/statements |
60 | | - GOO_PATH_UPDATE: /repositories/ontoportal_test/statements |
61 | | - profiles: |
62 | | - - agraph |
63 | | - depends_on: |
64 | | - <<: *depends_on |
65 | | - agraph-ut: |
66 | | - condition: service_healthy |
| 20 | + - linux |
67 | 21 |
|
68 | 22 | redis-ut: |
69 | 23 | image: redis |
| 24 | + ports: |
| 25 | + - 6379:6379 |
70 | 26 | command: ["redis-server", "--save", "", "--appendonly", "no"] |
71 | 27 | healthcheck: |
72 | 28 | test: redis-cli ping |
73 | 29 | interval: 10s |
74 | 30 | timeout: 3s |
75 | 31 | retries: 10 |
76 | 32 |
|
| 33 | + solr-ut: |
| 34 | + image: solr:9 |
| 35 | + command: bin/solr start -cloud -f |
| 36 | + ports: |
| 37 | + - 8983:8983 |
| 38 | + healthcheck: |
| 39 | + test: ["CMD", "curl", "-sf", "http://localhost:8983/solr/admin/info/system?wt=json"] |
| 40 | + start_period: 5s |
| 41 | + interval: 10s |
| 42 | + timeout: 5s |
| 43 | + retries: 5 |
| 44 | + |
77 | 45 | 4store-ut: |
78 | 46 | image: bde2020/4store |
79 | 47 | platform: linux/amd64 |
| 48 | + ports: |
| 49 | + - 9000:9000 |
80 | 50 | command: > |
81 | | - bash -c "4s-backend-setup --segments 4 ontoportal_kb |
82 | | - && 4s-backend ontoportal_kb |
83 | | - && 4s-httpd -D -s-1 -p 9000 ontoportal_kb" |
84 | | - profiles: |
85 | | - - 4store |
86 | | - |
87 | | - solr-term-ut: |
88 | | - image: solr:8 |
89 | | - volumes: |
90 | | - - ./test/solr/configsets:/configsets:ro |
91 | | - # ports: |
92 | | - # - "8983:8983" |
93 | | - command: ["solr-precreate", "term_search_core1", "/configsets/term_search"] |
94 | | - healthcheck: |
95 | | - test: ["CMD-SHELL", "curl -sf http://localhost:8983/solr/term_search_core1/admin/ping?wt=json | grep -iq '\"status\":\"OK\"}' || exit 1"] |
96 | | - start_period: 5s |
97 | | - interval: 10s |
98 | | - timeout: 5s |
99 | | - retries: 5 |
100 | | - |
101 | | - solr-prop-ut: |
102 | | - image: solr:8 |
103 | | - volumes: |
104 | | - - ./test/solr/configsets:/configsets:ro |
105 | | - # ports: |
106 | | - # - "8984:8983" |
107 | | - command: ["solr-precreate", "prop_search_core1", "/configsets/property_search"] |
| 51 | + bash -c "4s-backend-setup --segments 4 ontoportal_test |
| 52 | + && 4s-backend ontoportal_test |
| 53 | + && 4s-httpd -D -s-1 -p 9000 ontoportal_test" |
108 | 54 | healthcheck: |
109 | | - test: ["CMD-SHELL", "curl -sf http://localhost:8983/solr/prop_search_core1/admin/ping?wt=json | grep -iq '\"status\":\"OK\"}' || exit 1"] |
| 55 | + test: ["CMD", "4s-backend-info", "ontoportal_test"] |
110 | 56 | start_period: 5s |
111 | 57 | interval: 10s |
112 | | - timeout: 5s |
| 58 | + timeout: 10s |
113 | 59 | retries: 5 |
| 60 | + profiles: |
| 61 | + - fs |
114 | 62 |
|
115 | 63 | agraph-ut: |
116 | | - image: franzinc/agraph:v8.3.1 |
117 | | - platform: linux/amd64 |
| 64 | + image: franzinc/agraph:v8.4.3 |
| 65 | + platform: linux/amd64 #agraph doesn't provide arm platform |
118 | 66 | environment: |
119 | 67 | - AGRAPH_SUPER_USER=test |
120 | 68 | - AGRAPH_SUPER_PASSWORD=xyzzy |
121 | 69 | shm_size: 1g |
122 | | - # ports: |
123 | | - # - 10035:10035 |
| 70 | + ports: |
| 71 | + - 10035:10035 |
124 | 72 | command: > |
125 | 73 | bash -c "/agraph/bin/agraph-control --config /agraph/etc/agraph.cfg start |
126 | 74 | ; agtool repos create --supersede ontoportal_test |
127 | 75 | ; agtool users add anonymous |
128 | 76 | ; agtool users grant anonymous root:ontoportal_test:rw |
129 | 77 | ; tail -f /agraph/data/agraph.log" |
130 | 78 | healthcheck: |
131 | | - test: ["CMD-SHELL", "agtool storage-report ontoportal_test || exit 1"] |
| 79 | + test: ["CMD", "agtool", "storage-report", "ontoportal_test"] |
132 | 80 | start_period: 30s #AllegroGraph can take a loooooong time to start |
133 | 81 | interval: 20s |
134 | 82 | timeout: 10s |
135 | 83 | retries: 20 |
136 | 84 | profiles: |
137 | | - - agraph |
| 85 | + - ag |
138 | 86 |
|
139 | | -volumes: |
140 | | - bundle: |
| 87 | + virtuoso-ut: |
| 88 | + image: openlink/virtuoso-opensource-7:7.2.16 |
| 89 | + environment: |
| 90 | + - SPARQL_UPDATE=true |
| 91 | + - DBA_PASSWORD=dba |
| 92 | + - DAV_PASSWORD=dba |
| 93 | + ports: |
| 94 | + - 1111:1111 |
| 95 | + - 8890:8890 |
| 96 | + volumes: |
| 97 | + - ./test/fixtures/backends/virtuoso_initdb_d:/initdb.d |
| 98 | + healthcheck: |
| 99 | + test: [ "CMD-SHELL", "echo 'status();' | isql localhost:1111 dba dba || exit 1" ] |
| 100 | + start_period: 10s |
| 101 | + interval: 10s |
| 102 | + timeout: 5s |
| 103 | + retries: 3 |
| 104 | + profiles: |
| 105 | + - vo |
| 106 | + |
| 107 | + graphdb-ut: |
| 108 | + image: ontotext/graphdb:10.8.12 |
| 109 | + environment: |
| 110 | + GDB_HEAP_SIZE: 5G |
| 111 | + GDB_JAVA_OPTS: >- |
| 112 | + -Xms5g -Xmx5g |
| 113 | + ports: |
| 114 | + - 7200:7200 |
| 115 | + - 7300:7300 |
| 116 | + healthcheck: |
| 117 | + test: [ "CMD", "curl", "-sf", "http://localhost:7200/repositories/ontoportal_test/health" ] |
| 118 | + start_period: 10s |
| 119 | + interval: 10s |
| 120 | + volumes: |
| 121 | + - ./test/fixtures/backends/graphdb:/opt/graphdb/dist/configs/templates/data |
| 122 | + entrypoint: > |
| 123 | + bash -c " importrdf load -f -c /opt/graphdb/dist/configs/templates/data/graphdb-repo-config.ttl -m parallel /opt/graphdb/dist/configs/templates/data/graphdb-test-load.nt |
| 124 | + ; graphdb -Ddefault.min.distinct.threshold=3000 " |
| 125 | + profiles: |
| 126 | + - gd |
0 commit comments