forked from bluthg/odbc_fdw
-
Notifications
You must be signed in to change notification settings - Fork 22
/
.travis.yml
72 lines (60 loc) · 2.51 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
language: c
group: travis_stable
sudo: required
# Run only if branch is local
if: env(TRAVIS_PULL_REQUEST_SLUG) = env(TRAVIS_REPO_SLUG)
env:
global:
- PAGER=cat
- HIVE_VERSION=2.1.1
- HIVE_HOME=/opt/apache-hive-2.1.1-bin
- HADOOP_VERSION=2.7.5
- HADOOP_HOME=/opt/hadoop-2.7.5
- TDSVER=7.0
matrix:
include:
- env: POSTGRESQL_VERSION=9.5
- env: POSTGRESQL_VERSION=9.6
- env: POSTGRESQL_VERSION=10
- env: POSTGRESQL_VERSION=11
- env: POSTGRESQL_VERSION=12
addons:
apt:
sources:
- sourceline: 'ppa:cartodb/odbc'
packages:
- unixodbc-dev
- odbcinst # ODBC core
- odbc-postgresql # PgSQL ODBC
- libmyodbc # MySQL ODBC
- freetds # Custom package to use freetds >= 1.x in trusty
before_install:
# Decrypt config files
# mysql.config, sqlserver.config, hive.config and postgres.config have been compressed into one file to ease encryption/decryption.
- openssl aes-256-cbc -K $encrypted_09e387fba547_key -iv $encrypted_09e387fba547_iv -in $TRAVIS_BUILD_DIR/test/config/configs.tar.enc -out $TRAVIS_BUILD_DIR/test/config/configs.tar -d
# Extract config files
- tar xvf $TRAVIS_BUILD_DIR/test/config/configs.tar -C $TRAVIS_BUILD_DIR/test/config
# Install PostgreSQL (no sudos in script)
- sudo bash $TRAVIS_BUILD_DIR/test/scripts/ci/install_postgres.sh
# Install Hive (sudos in script as needed)
- bash $TRAVIS_BUILD_DIR/test/scripts/ci/install_hive.sh
# Start & Update MySQL (update using apt addon will fail if mysql not started)
- sudo systemctl enable mysql
- sudo service mysql start
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install mysql-server-core-5.7 mysql-client-5.7 mysql-server-5.7
# ODBC installation ini file
- sudo cp $TRAVIS_BUILD_DIR/test/scripts/ci/odbcinst.ini /etc
install:
- bash $TRAVIS_BUILD_DIR/test/fixtures/load_all_fixtures.sh
- bash $TRAVIS_BUILD_DIR/test/tests-generator.sh
- cat $TRAVIS_BUILD_DIR/test/config/postgres.config
- cat $TRAVIS_BUILD_DIR/test/sql/postgres_10_installation_test.sql
- psql -U postgres -d fdw_tests -c "select * from pg_foreign_server"
- psql -U postgres -d fdw_tests -c "select * from pg_user_mapping"
- psql -U postgres -d fdw_tests -c "select * from pg_foreign_table"
- psql -U postgres -c "select * from pg_foreign_data_wrapper"
- sudo make install
script:
- make integration_tests || { cat test/regression.diffs; false; }
after_failure:
- sudo cat /var/log/postgresql/postgresql-${PGSQL_VERSION}-main.log