Skip to content

Commit dc77a1f

Browse files
committed
fix .travis.yml
1 parent 8fba638 commit dc77a1f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.travis.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,20 @@ python:
1818
- "pypy3"
1919

2020
before_install:
21-
- packages="postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-common"
22-
- sudo sh ./travis/dep-ubuntu-postgres.sh
21+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -y install -qq wget ca-certificates; fi
22+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo sh ./travis/dep-ubuntu-postgres.sh; fi
23+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
2324

2425
install:
25-
- sudo apt-get update
2626
- sudo service postgresql stop
2727
- echo 'exit 0' | sudo tee /etc/init.d/postgresql
2828
- sudo chmod a+x /etc/init.d/postgresql
29-
- sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install $packages
3029

3130
before_script:
32-
- sudo pg_createcluster --start $PGVERSION testgres -- -A trust
31+
- sudo pg_createcluster --start $PG_VER testgres -- -A trust
3332
- sudo chmod a+w /var/run/postgresql/
3433
- sudo /etc/init.d/postgresql restart
35-
- export PG_CONFIG=/usr/lib/postgresql/$PGVERSION/bin/pg_config
34+
- export PG_CONFIG=/usr/lib/postgresql/$PG_VER/bin/pg_config
3635
- virtualenv /tmp/envs/testgres
3736
- source /tmp/envs/testgres/bin/activate
3837
- pip install six psycopg2 pg8000 flake8

0 commit comments

Comments
 (0)