Add CI tests on Travis-ci and Appveyor

This commit is contained in:
Lars Kanis 2018-02-06 22:44:36 +01:00
parent e55b6305f7
commit 7480afcfbd
No known key found for this signature in database
GPG Key ID: 20362776599898C0
3 changed files with 43 additions and 1 deletions

17
.travis.yml Normal file
View File

@ -0,0 +1,17 @@
sudo: required
language: ruby
rvm:
- "2.0.0"
- ruby-head
env:
- "PGVERSION=10.0-1-linux-x64 PATH=\"/opt/PostgreSQL/10/bin:$PATH\""
- "PGVERSION=9.3.19-1-linux-x64 PATH=\"/opt/PostgreSQL/9.3/bin:$PATH\""
before_install:
- gem install bundler
- bundle install
# Download and install postgresql version to test against in /opt
- |
wget http://get.enterprisedb.com/postgresql/postgresql-$PGVERSION.run && \
chmod +x postgresql-$PGVERSION.run && \
sudo ./postgresql-$PGVERSION.run --extract-only 1 --mode unattended
script: rake test

25
appveyor.yml Normal file
View File

@ -0,0 +1,25 @@
init:
- set PATH=C:/Ruby%ruby_version%/bin;c:/Program Files/Git/cmd;c:/Windows/system32;C:/Windows/System32/WindowsPowerShell/v1.0
- set RUBYOPT=--verbose
install:
- ver
- ruby --version
- gem --version
- gem install bundler --conservative
- bundle install
build_script:
- set PATH=C:/Program Files/PostgreSQL/%PGVER%/bin;%PATH%
- md temp
- icacls temp /grant Everyone:(OI)(CI)F /T
test_script:
- bundle exec rake test
environment:
matrix:
- ruby_version: "25-x64"
PGVER: 10
- ruby_version: "22"
PGVER: 10

View File

@ -1,5 +1,5 @@
require "minitest/autorun" require "minitest/autorun"
require "pg_ldap_sync/application" require "pg_ldap_sync"
require 'yaml' require 'yaml'
require 'fileutils' require 'fileutils'
require_relative 'ldap_server' require_relative 'ldap_server'