Test with gitlab ci runner.
This commit is contained in:
parent
8c819cee3f
commit
5b69f66739
2 changed files with 48 additions and 1 deletions
42
.gitlab-ci.yml
Normal file
42
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,42 @@
|
|||
before_script:
|
||||
- bundle install
|
||||
|
||||
stages:
|
||||
- test
|
||||
|
||||
job_unit:
|
||||
stage: test
|
||||
script:
|
||||
- export RAILS_ENV=test
|
||||
- script/build/test_db_config.sh ci_zammad_unit
|
||||
- rake db:drop;
|
||||
- rake db:create
|
||||
- rake db:migrate
|
||||
- rake db:seed
|
||||
- rake test:units
|
||||
- rake test:controllers
|
||||
|
||||
job_integration_email_helper:
|
||||
stage: test
|
||||
script:
|
||||
- export RAILS_ENV=test
|
||||
- script/build/test_db_config.sh ci_zammad_email_helper
|
||||
- rake db:drop;
|
||||
- rake db:create
|
||||
- rake db:migrate
|
||||
- ruby -I test/ test/integration/email_helper_test.rb
|
||||
|
||||
job_integration_geo_ip:
|
||||
stage: test
|
||||
script:
|
||||
- export RAILS_ENV=test
|
||||
- script/build/test_db_config.sh ci_zammad_geo_ip
|
||||
- rake db:drop;
|
||||
- rake db:create
|
||||
- rake db:migrate
|
||||
- ruby -I test/ test/integration/geo_ip_test.rb
|
||||
|
||||
rubocop:
|
||||
stage: test
|
||||
script:
|
||||
- bundle exec rubocop
|
|
@ -1,6 +1,11 @@
|
|||
# encoding: utf-8
|
||||
require 'test_helper'
|
||||
|
||||
# set config
|
||||
if !ENV['LDAP_HOST']
|
||||
fail "ERROR: Need LDAP_HOST - hint LDAP_HOST='ldap://ci.zammad.org'"
|
||||
end
|
||||
|
||||
Setting.create_or_update(
|
||||
title: 'Authentication via LDAP',
|
||||
name: 'auth_ldap',
|
||||
|
@ -8,7 +13,7 @@ Setting.create_or_update(
|
|||
description: 'Enables user authentication via LDAP.',
|
||||
state: {
|
||||
adapter: 'Auth::Ldap',
|
||||
host: 'localhost',
|
||||
host: ENV['LDAP_HOST'],
|
||||
port: 389,
|
||||
bind_dn: 'cn=Manager,dc=example,dc=org',
|
||||
bind_pw: 'example',
|
||||
|
|
Loading…
Reference in a new issue