Last active
March 29, 2021 06:17
-
-
Save mustafa-travisci/595be7dd01fb3d3ed9f08cde15c4f8de to your computer and use it in GitHub Desktop.
PostgreSQL12 on Xenial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: shell | |
dist: xenial | |
env: | |
global: | |
- PGPORT=5433 | |
- PGUSER=travis | |
addons: | |
apt: | |
packages: | |
- postgresql-12 | |
postgresql: '12' | |
before_install: | |
- echo 'installing postgresql' | |
- sudo sed -i 's/port = 5432 */port = 5433/' /etc/postgresql/12/main/postgresql.conf | |
- sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf | |
- sudo service postgresql restart | |
- sleep 1 | |
- sudo service postgresql stop | |
- sudo service postgresql start 12 | |
- postgres --version | |
before_script: | |
- psql -c 'create database "test_db";' -U postgres | |
- psql -Upostgres -hlocalhost -p5433 -c "SELECT version();" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment