1
0
mirror of https://github.com/danbee/chess synced 2025-03-04 08:39:06 +00:00

Add Codeship setup script

This commit is contained in:
Daniel Barber 2018-01-19 10:27:56 -05:00
parent 0ec6972122
commit 9ce67a37fb
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8

31
bin/codeship_setup Executable file
View File

@ -0,0 +1,31 @@
# Cached install of Erlang
source /dev/stdin <<< "$(curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/languages/erlang.sh)"
# Cached install of Elixir
source /dev/stdin <<< "$(curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/languages/elixir.sh)"
# Install PhantomJS
curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/phantomjs.sh | bash -s
# Install correct version of NodeJS
nvm install $NODE_VERSION
# Install Phoenix dependencies
mix local.hex --force
mix local.rebar --force
export MIX_ENV=test
mix deps.get
mix deps.compile
# Create and migrate database
mix ecto.create
mix ecto.migrate
# Run PhantomJS in the background
phantomjs --webdriver=0.0.0.0:8910 2>/dev/null &
# Install asset dependencies
cd assets
npm install
cd ..