language: ruby cache: bundler rvm: - 2.4.2 - 2.3.5 - 2.2.8 env: matrix: - PG_VERSION=9.3 - PG_VERSION=9.4 - PG_VERSION=9.5 before_install: - git config --global user.name "Prodder In Travis-CI" - git config --global user.email "prodder@example.com" # install postgresql v9.5 - if [[ "$PG_VERSION" = "9.5" ]]; then echo "installing pg9.5"; sudo /etc/init.d/postgresql stop; sudo apt-get -y autoremove; sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 7FCC7D46ACCC4CF8; sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main 9.5" >> /etc/apt/sources.list.d/postgresql.list'; sudo apt-get update; sudo apt-get -y install postgresql-9.5; sudo cp /etc/postgresql/9.4/main/pg_hba.conf /etc/postgresql/9.5/main/pg_hba.conf; sudo sed -i 's/5433/5432/' /etc/postgresql/9.5/main/postgresql.conf; sudo /etc/init.d/postgresql restart; else echo "not installing pg9.5"; fi # setup travis user - if [[ "$PG_VERSION" = "9.5" ]]; then echo "setting up users for pg9.5"; PGUSER=postgres createuser --superuser travis || echo role travis already exists.; fi # setup pg_dump - sudo ln -sfn /usr/lib/postgresql/$PG_VERSION/bin/pg_dump /usr/bin/pg_dump # start up the specific version of PG - sudo -E sh -c 'service postgresql stop' - sleep 5s - sudo -E sh -c 'service postgresql start $PG_VERSION' - psql -U postgres -d postgres -c 'select setting from pg_settings where name = $m$server_version$m$;' script: - psql --version - pg_lsclusters - psql -U postgres -d postgres -c 'select 1;' - ls -al `which pg_dump` - bundle exec rake spec - bundle exec rake cucumber deploy: provider: rubygems api_key: secure: "UhUkPFhEuI1dLPa4skTUdOBcGY2SEkRP3N9jLDQad04DflV+GutcjrfN1iQxWk59gVt3zqird5FS8SdwCFuOn8DAU9ACtg73xiPPWRRTdzma4Qw+4thuOHcdwPBz3762YFTRyH7IbRTAlxaD6qPz6US3BnYAkJU7C8c30rHLX6cZutjLV4FsvWonkzxcjyEUViVEdBM0kzI+tdBnQovpcM67a9AfxxBZITJLIfIcah1qc/RANpLkUFJCwNyH9oARWsGIvpIKcQEJBhsl04tvbNRLpiMCk1e1RS1bjMdbbx/rVm3C7dvAjUznbr3ON9abgoe6QDDYr6kXPJbylmxFUzA7ftBWjz2nNruRncsohx08LaM4ADRJWKB3XbP5BXkwUgE672Fi20+Z78LwWfjrr3iRVm7u9Mt9pZHG6Ih8Jy64Uq3647kdVZu9APPfn1NZETFG7vLAMZUtPXv7HBkujlq23XdYXax1XYYbYsM0LOlnG6ol2y6OrBrxWIqC+E8UmLXf/+/MS4j3v2RAe7jXh6fFlw+5MjLr3HXqZ12CrAChp22NRPp1OY4Hac4zzRwGeVOgewknpOK7qQfVFFaQoQksU6VaenSx+TxcYOZYuQdrQjfbO6c+Q/vvZ1RoPOEwH0AelkrW2eGqQTNVWIbH5vvfhys68SA8ov8gNnIzMtU=" gem: prodder on: tags: true repo: enova/prodder