mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-02 12:17:39 -06:00
6fe2703665
* Remove `make updatedeps` from Travis build. We'll follow up with more specific plans around dependency updating in subsequent PRs. * Update all `make` targets to set `GO15VENDOREXPERIMENT=1` and to filter out `/vendor/` from `./...` where appropriate. * Temporarily remove `vet` from the `make test` target until we can figure out how to get it to not vet `vendor/`. (Initial experimentation failed to yield the proper incantation.) Everything is pinned to current master, with the exception of: * Azure/azure-sdk-for-go which is pinned before the breaking change today * aws/aws-sdk-go which is pinned to the most recent tag The documentation still needs to be updated, which we can do in a follow up PR. The goal here is to unblock release.
72 lines
4.0 KiB
YAML
72 lines
4.0 KiB
YAML
language: go
|
|
|
|
go:
|
|
- 1.1
|
|
- 1.2
|
|
- 1.3
|
|
- 1.4
|
|
- 1.5
|
|
- tip
|
|
|
|
before_install:
|
|
- psql --version
|
|
- sudo /etc/init.d/postgresql stop
|
|
- sudo apt-get -y --purge remove postgresql libpq-dev libpq5 postgresql-client-common postgresql-common
|
|
- sudo rm -rf /var/lib/postgresql
|
|
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
|
- sudo sh -c "echo deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main $PGVERSION >> /etc/apt/sources.list.d/postgresql.list"
|
|
- sudo apt-get update -qq
|
|
- sudo apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::="--force-confnew" install postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-contrib-$PGVERSION
|
|
- sudo chmod 777 /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "local all postgres trust" > /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "local all all trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "hostnossl all pqgossltest 127.0.0.1/32 reject" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "hostnossl all pqgosslcert 127.0.0.1/32 reject" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "hostssl all pqgossltest 127.0.0.1/32 trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "hostssl all pqgosslcert 127.0.0.1/32 cert" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "host all all 127.0.0.1/32 trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "hostnossl all pqgossltest ::1/128 reject" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "hostnossl all pqgosslcert ::1/128 reject" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "hostssl all pqgossltest ::1/128 trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "hostssl all pqgosslcert ::1/128 cert" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- echo "host all all ::1/128 trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
|
|
- sudo install -o postgres -g postgres -m 600 -t /var/lib/postgresql/$PGVERSION/main/ certs/server.key certs/server.crt certs/root.crt
|
|
- sudo bash -c "[[ '${PGVERSION}' < '9.2' ]] || (echo \"ssl_cert_file = 'server.crt'\" >> /etc/postgresql/$PGVERSION/main/postgresql.conf)"
|
|
- sudo bash -c "[[ '${PGVERSION}' < '9.2' ]] || (echo \"ssl_key_file = 'server.key'\" >> /etc/postgresql/$PGVERSION/main/postgresql.conf)"
|
|
- sudo bash -c "[[ '${PGVERSION}' < '9.2' ]] || (echo \"ssl_ca_file = 'root.crt'\" >> /etc/postgresql/$PGVERSION/main/postgresql.conf)"
|
|
- sudo sh -c "echo 127.0.0.1 postgres >> /etc/hosts"
|
|
- sudo ls -l /var/lib/postgresql/$PGVERSION/main/
|
|
- sudo cat /etc/postgresql/$PGVERSION/main/postgresql.conf
|
|
- sudo chmod 600 $PQSSLCERTTEST_PATH/postgresql.key
|
|
- sudo /etc/init.d/postgresql restart
|
|
|
|
env:
|
|
global:
|
|
- PGUSER=postgres
|
|
- PQGOSSLTESTS=1
|
|
- PQSSLCERTTEST_PATH=$PWD/certs
|
|
- PGHOST=127.0.0.1
|
|
matrix:
|
|
- PGVERSION=9.5 PQTEST_BINARY_PARAMETERS=yes
|
|
- PGVERSION=9.4 PQTEST_BINARY_PARAMETERS=yes
|
|
- PGVERSION=9.3 PQTEST_BINARY_PARAMETERS=yes
|
|
- PGVERSION=9.2 PQTEST_BINARY_PARAMETERS=yes
|
|
- PGVERSION=9.1 PQTEST_BINARY_PARAMETERS=yes
|
|
- PGVERSION=9.0 PQTEST_BINARY_PARAMETERS=yes
|
|
- PGVERSION=8.4 PQTEST_BINARY_PARAMETERS=yes
|
|
- PGVERSION=9.5 PQTEST_BINARY_PARAMETERS=no
|
|
- PGVERSION=9.4 PQTEST_BINARY_PARAMETERS=no
|
|
- PGVERSION=9.3 PQTEST_BINARY_PARAMETERS=no
|
|
- PGVERSION=9.2 PQTEST_BINARY_PARAMETERS=no
|
|
- PGVERSION=9.1 PQTEST_BINARY_PARAMETERS=no
|
|
- PGVERSION=9.0 PQTEST_BINARY_PARAMETERS=no
|
|
- PGVERSION=8.4 PQTEST_BINARY_PARAMETERS=no
|
|
|
|
script:
|
|
- go test -v ./...
|
|
|
|
before_script:
|
|
- psql -c 'create database pqgotest' -U postgres
|
|
- psql -c 'create user pqgossltest' -U postgres
|
|
- psql -c 'create user pqgosslcert' -U postgres
|