Skip to content

Commit

Permalink
Merge 5a85d4b into f23bd7d
Browse files Browse the repository at this point in the history
  • Loading branch information
rzane committed May 23, 2018
2 parents f23bd7d + 5a85d4b commit 939a9b4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: required

language: elixir
elixir:
- 1.5
- 1.6.5

services:
- docker
Expand All @@ -11,7 +11,8 @@ install:
- docker-compose build mssqlex

script:
- docker-compose run mssqlex
- docker-compose run mssqlex mix compile --warnings-as-errors
- docker-compose run mssqlex mix coveralls.travis

after_script:
- mix local.hex --force
Expand Down
17 changes: 8 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM elixir:1.5
FROM elixir:1.6.5-slim

# --- Set Locale to en_US.UTF-8 ---

Expand All @@ -14,13 +14,12 @@ ENV LC_ALL en_US.UTF-8

# --- MSSQL ODBC INSTALL ---

RUN apt-get update && apt-get install -y --no-install-recommends apt-transport-https

RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/debian/8/prod.list | tee -a /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install msodbcsql -y \
&& apt-get install unixodbc-dev -y
RUN apt-get update && \
apt-get -y install curl apt-transport-https gnupg2 && \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y msodbcsql17

# --- APP INSTALL ---

Expand All @@ -29,7 +28,7 @@ RUN mix local.hex --force && \

COPY . /usr/src/app
WORKDIR /usr/src/app
RUN mix do deps.get
RUN mix do deps.get, deps.compile

# --- Be able to run wait for it script ---

Expand Down
9 changes: 7 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ services:
- MSSQL_HST=sql_server
- MSSQL_IN=MSSQLSERVER
- MSSQL_PRT=9204
- MSSQL_DVR={ODBC Driver 13 for SQL Server}
- MSSQL_DVR={ODBC Driver 17 for SQL Server}
- TRAVIS_JOB_ID=$TRAVIS_JOB_ID
depends_on:
- sql_server
command: ["./wait-for-it.sh", "sql_server:9204", "-s", "--", "mix", "coveralls.travis"]
volumes:
- .:/usr/src/app/
- /usr/src/app/deps
- /usr/src/app/_build
entrypoint: ./wait-for-it.sh sql_server:9204 --
command: mix test

0 comments on commit 939a9b4

Please sign in to comment.