Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including hub server for integration tests #14

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,39 @@ elixir:
- 1.10.3
otp_release:
- 23.0.2
services:
- postgresql
cache:
directories:
- _build
- deps
- smart-home-auth-server-deps
nelsonic marked this conversation as resolved.
Show resolved Hide resolved
before_install:
- sudo apt-get update
# build utils required to compile github.com/boydm/scenic_driver_glfw
- sudo apt-get install -y pkgconf libglfw3 libglfw3-dev libglew2.0 libglew-dev
- mix local.hex --force
- mix local.rebar --force
- mix archive.install --force hex nerves_bootstrap
# Include our hub server at master
- git clone https://github.com/dwyl/smart-home-auth-server
# - mkdir smart-home-auth-server/deps
# - cp -R smart-home-auth-server-deps/* smart-home-auth-server/deps
- cd smart-home-auth-server
- mix setup
- |
mix phx.server&
SERVER_PID=$!
- cd ../
script:
- mix coveralls.json
after_success:
- bash <(curl -s https://codecov.io/bash)
- tail -f /proc/$SERVER_PID/fd/1
- kill $SERVER_PID
# - rm -rf smart-home-auth-server-deps
# - mkdir smart-home-auth-server-deps
# - cp -R smart-home-auth-server/deps/* smart-home-auth-server-deps
env:
global:
- MIX_ENV=test
Expand Down
4 changes: 2 additions & 2 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ config :nerves, source_date_epoch: "1594028364"
# See https://hexdocs.pm/ring_logger/readme.html for more information on
# configuring ring_logger.
if Mix.env() == :test do
config :logger, level: :error
config :logger, level: :info
end


config :smart_home_firmware,
hub: "192.168.0.14:4000"
hub: "localhost:4000"

if Mix.target() == :host do
import_config "host.exs"
Expand Down
9 changes: 9 additions & 0 deletions install_hub.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

git clone https://github.com/dwyl/smart-home-auth-server
cd smart-home-auth-server

mix setup
mix phx.server &

cd ../