-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
42 lines (39 loc) · 1.17 KB
/
.gitlab-ci.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
---
variables:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: dev
services:
- mariadb:10.3
stages:
- test
test:
stage: test
tags: [docker]
image: ocaml/opam2:4.11
environment:
name: production
variables:
DATABASE_URL_TEST_MARIADB: mariadb://root:${MYSQL_ROOT_PASSWORD}@mariadb:3306/${MYSQL_DATABASE}
artifacts:
paths:
- _build/default/test/
script:
- echo "Updating OPAM"
- sudo apt-get update -y
- sudo apt-get install -y libmariadb-dev
- opam remote remove --all default
- opam remote add default https://opam.ocaml.org
- echo "Pin package"
- opam pin add . --yes --no-action
- echo "Query and install external depencencies"
- opam depext ask ask-integrator --yes --with-doc --with-test
- echo "Install dependencies"
- OPAMSOLVERTIMEOUT=180 opam install . --deps-only --with-doc --with-test --locked --unlock-base
- opam install ocamlformat --skip-updates
- echo "Install test dependencies"
- opam install -y alcotest-lwt
- sudo chown -R opam:nogroup .
- echo "compile project"
- opam config exec -- make
- echo "Running tests including migrations"
- opam config exec -- make test