Skip to content

Подключить Travis CI к репозиторию #98

@ivshapovalov

Description

@ivshapovalov

Задача выполняется после задачи #94

  1. Добавить в пакет test папку resources/config. Папку resources назначить в IDEA папкой тестовых ресурсов.
  2. Создать в этой папке файл pg_hba.conf с содержимым:
local   all             postgres                                     trust
host    all             postgres             ::1/128                 trust
host    all             postgres             127.0.0.1/32           trust

host    all             all             ::1/128                 md5
host    all             all             127.0.0.1/32           md5
  1. В корне проекта создать файл .travis.yml с содержимым:
language: java

jdk:
- oraclejdk8

addons:
  postgresql: "9.6"

services:
  - postgresql

before_script:
    - sudo mv -f $TRAVIS_BUILD_DIR/target/test-classes/config/pg_hba.conf /etc/postgresql/9.6/main/
    - sudo service postgresql restart
    - psql -U postgres -c "CREATE USER sqlcmd PASSWORD 'sqlcmd';"
   - psql -U postgres -c "CREATE DATABASE sqlcmd OWNER sqlcmd ENCODING = 'UTF8' CONNECTION LIMIT = -1;" 
  1. Подключить к своему репозиторию на гитхабе Travis CI, разобраться с содержимым файла выше.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions