Last active
March 30, 2021 10:59
-
-
Save mustafa-travisci/13d09209e96cefbdd9a7017ca0a1e863 to your computer and use it in GitHub Desktop.
PostgreSQL12 on Bionic
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: bionic | |
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