Commit fd652411 authored by Michal Čihař's avatar Michal Čihař

Share environment setup between CIs

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent efefbb40
...@@ -31,9 +31,7 @@ install: ...@@ -31,9 +31,7 @@ install:
# create databases # create databases
before_script: before_script:
- timestamp.sh before_script - timestamp.sh before_script
- mysql -e 'CREATE DATABASE weblate CHARACTER SET utf8 COLLATE utf8_general_ci;' - ./ci/setup-env
- psql -c 'create database weblate;' -U postgres
- if [ -n "$DO_SELENIUM" ] ; then curl -L https://gist.githubusercontent.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash ; fi
- echo -e "[server]\nmax_allowed_packet=64M\nwait_timeout=28800" | sudo tee -a /etc/mysql/conf.d/weblate.cnf - echo -e "[server]\nmax_allowed_packet=64M\nwait_timeout=28800" | sudo tee -a /etc/mysql/conf.d/weblate.cnf
- sudo service mysql restart - sudo service mysql restart
# commands to run tests # commands to run tests
......
#!/bin/sh
# Environment setup
set -e
set -x
mysql -e 'DROP DATABASE IF EXISTS weblate;'
mysql -e 'CREATE DATABASE weblate CHARACTER SET utf8 COLLATE utf8_general_ci;'
psql -c 'DROP DATABASE IF EXISTS weblate;' -U postgres
psql -c 'CREATE DATABASE weblate;' -U postgres
if [ -n "$DO_SELENIUM" ] ; then
curl -L https://gist.githubusercontent.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash
fi
...@@ -23,11 +23,7 @@ install: ...@@ -23,11 +23,7 @@ install:
- pip install -r requirements-optional.txt -r ci/requirements-shippable.txt -r ci/requirements-${TRAVIS_DATABASE:-sqlite}.txt - pip install -r requirements-optional.txt -r ci/requirements-shippable.txt -r ci/requirements-${TRAVIS_DATABASE:-sqlite}.txt
# create databases # create databases
before_script: before_script:
- mysql -e 'DROP DATABASE IF EXISTS weblate;' - ./ci/setup-env
- mysql -e 'CREATE DATABASE weblate CHARACTER SET utf8 COLLATE utf8_general_ci;'
- psql -c 'DROP DATABASE IF EXISTS weblate;' -U postgres
- psql -c 'CREATE DATABASE weblate;' -U postgres
- if [ -n "$DO_SELENIUM" ] ; then curl -L https://gist.githubusercontent.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash ; fi
- mkdir -p shippable/testresults - mkdir -p shippable/testresults
- mkdir -p shippable/codecoverage - mkdir -p shippable/codecoverage
# commands to run tests # commands to run tests
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment