Extend Travis CI to test BIM edtion with postgres by adding ENV variable OPENPROJECT_EDITION

pull/7115/head
Wieland Lindenthal 6 years ago
parent 404831e97a
commit d7fce84b9f
  1. 87
      .travis.yml
  2. 9
      Gemfile.modules
  3. 7
      script/ci/setup.sh

@ -91,10 +91,15 @@ jobs:
- bash script/ci/runner.sh spec_legacy 1 1
if: env(SKIP_MYSQL_TESTING) IS blank
- stage: test
name: 'spec_legacy (1/1) - postgres'
name: 'spec_legacy (1/1) - postgres standard'
script:
- bash script/ci/setup.sh spec_legacy postgres
- bash script/ci/runner.sh spec_legacy 1 1
- stage: test
name: 'spec_legacy (1/1) - postgres bim'
script:
- bash script/ci/setup.sh spec_legacy postgres bim
- bash script/ci/runner.sh spec_legacy 1 1
- stage: test
name: 'units (1/4) - mysql'
script:
@ -102,10 +107,15 @@ jobs:
- bash script/ci/runner.sh units 4 1
if: env(SKIP_MYSQL_TESTING) IS blank
- stage: test
name: 'units (1/4) - postgres'
name: 'units (1/4) - postgres standard'
script:
- bash script/ci/setup.sh units postgres
- bash script/ci/runner.sh units 4 1
- stage: test
name: 'units (1/4) - postgres bim'
script:
- bash script/ci/setup.sh units postgres bim
- bash script/ci/runner.sh units 4 1
- stage: test
name: 'units (2/4) - mysql'
script:
@ -113,10 +123,15 @@ jobs:
- bash script/ci/runner.sh units 4 2
if: env(SKIP_MYSQL_TESTING) IS blank
- stage: test
name: 'units (2/4) - postgres'
name: 'units (2/4) - postgres standard'
script:
- bash script/ci/setup.sh units postgres
- bash script/ci/runner.sh units 4 2
- stage: test
name: 'units (2/4) - postgres bim'
script:
- bash script/ci/setup.sh units postgres bim
- bash script/ci/runner.sh units 4 2
- stage: test
name: 'units (3/4) - mysql'
script:
@ -124,10 +139,15 @@ jobs:
- bash script/ci/runner.sh units 4 3
if: env(SKIP_MYSQL_TESTING) IS blank
- stage: test
name: 'units (3/4) - postgres'
name: 'units (3/4) - postgres standard'
script:
- bash script/ci/setup.sh units postgres
- bash script/ci/runner.sh units 4 3
- stage: test
name: 'units (3/4) - postgres bim'
script:
- bash script/ci/setup.sh units postgres bim
- bash script/ci/runner.sh units 4 3
- stage: test
name: 'units (4/4) - mysql'
script:
@ -135,10 +155,15 @@ jobs:
- bash script/ci/runner.sh units 4 4
if: env(SKIP_MYSQL_TESTING) IS blank
- stage: test
name: 'units (4/4) - postgres'
name: 'units (4/4) - postgres standard'
script:
- bash script/ci/setup.sh units postgres
- bash script/ci/runner.sh units 4 4
- stage: test
name: 'units (4/4) - postgres bim'
script:
- bash script/ci/setup.sh units postgres bim
- bash script/ci/runner.sh units 4 4
- stage: test
name: 'features (1/4) - mysql'
script:
@ -146,10 +171,15 @@ jobs:
- bash script/ci/runner.sh features 4 1
if: env(SKIP_MYSQL_TESTING) IS blank
- stage: test
name: 'features (1/4) - postgres'
name: 'features (1/4) - postgres standard'
script:
- bash script/ci/setup.sh features postgres
- bash script/ci/runner.sh features 4 1
- stage: test
name: 'features (1/4) - postgres bim'
script:
- bash script/ci/setup.sh features postgres bim
- bash script/ci/runner.sh features 4 1
- stage: test
name: 'features (2/4) - mysql'
script:
@ -157,10 +187,15 @@ jobs:
- bash script/ci/runner.sh features 4 2
if: env(SKIP_MYSQL_TESTING) IS blank
- stage: test
name: 'features (2/4) - postgres'
name: 'features (2/4) - postgres standard'
script:
- bash script/ci/setup.sh features postgres
- bash script/ci/runner.sh features 4 2
- stage: test
name: 'features (2/4) - postgres bim'
script:
- bash script/ci/setup.sh features postgres bim
- bash script/ci/runner.sh features 4 2
- stage: test
name: 'features (3/4) - mysql'
script:
@ -168,10 +203,15 @@ jobs:
- bash script/ci/runner.sh features 4 3
if: env(SKIP_MYSQL_TESTING) IS blank
- stage: test
name: 'features (3/4) - postgres'
name: 'features (3/4) - postgres standard'
script:
- bash script/ci/setup.sh features postgres
- bash script/ci/runner.sh features 4 3
- stage: test
name: 'features (3/4) - postgres bim'
script:
- bash script/ci/setup.sh features postgres bim
- bash script/ci/runner.sh features 4 3
- stage: test
name: 'features (4/4) - mysql'
script:
@ -179,10 +219,15 @@ jobs:
- bash script/ci/runner.sh features 4 4
if: env(SKIP_MYSQL_TESTING) IS blank
- stage: test
name: 'features (4/4) - postgres'
name: 'features (4/4) - postgres standard'
script:
- bash script/ci/setup.sh features postgres
- bash script/ci/runner.sh features 4 4
- stage: test
name: 'features (4/4) - postgres bim'
script:
- bash script/ci/setup.sh features postgres bim
- bash script/ci/runner.sh features 4 4
- stage: test
name: 'plugins:units (1/1) - mysql'
script:
@ -190,11 +235,17 @@ jobs:
- bash script/ci/runner.sh plugins:units 1 1
if: env(SKIP_MYSQL_TESTING) IS blank AND head_branch !~ /^core\//
- stage: test
name: 'plugins:units (1/1) - postgres'
name: 'plugins:units (1/1) - postgres standard'
script:
- bash script/ci/setup.sh plugins:units postgres
- bash script/ci/runner.sh plugins:units 1 1
if: head_branch !~ /^core\//
- stage: test
name: 'plugins:units (1/1) - postgres bim'
script:
- bash script/ci/setup.sh plugins:units postgres bim
- bash script/ci/runner.sh plugins:units 1 1
if: head_branch !~ /^core\//
- stage: test
name: 'plugins:features (1/1) - mysql'
script:
@ -202,11 +253,17 @@ jobs:
- bash script/ci/runner.sh plugins:features 1 1
if: env(SKIP_MYSQL_TESTING) IS blank AND head_branch !~ /^core\//
- stage: test
name: 'plugins:features (1/1) - postgres'
name: 'plugins:features (1/1) - postgres standard'
script:
- bash script/ci/setup.sh plugins:features postgres
- bash script/ci/runner.sh plugins:features 1 1
if: head_branch !~ /^core\//
- stage: test
name: 'plugins:features (1/1) - postgres bim'
script:
- bash script/ci/setup.sh plugins:features postgres bim
- bash script/ci/runner.sh plugins:features 1 1
if: head_branch !~ /^core\//
- stage: test
name: 'plugins:cucumber (1/1) - mysql'
script:
@ -214,11 +271,17 @@ jobs:
- bash script/ci/runner.sh plugins:cucumber 1 1
if: env(SKIP_MYSQL_TESTING) IS blank AND head_branch !~ /^core\//
- stage: test
name: 'plugins:cucumber (1/1) - postgres'
name: 'plugins:cucumber (1/1) - postgres standard'
script:
- bash script/ci/setup.sh plugins:cucumber postgres
- bash script/ci/runner.sh plugins:cucumber 1 1
if: head_branch !~ /^core\//
- stage: test
name: 'plugins:cucumber (1/1) - postgres bim'
script:
- bash script/ci/setup.sh plugins:cucumber postgres bim
- bash script/ci/runner.sh plugins:cucumber 1 1
if: head_branch !~ /^core\//
addons:
chrome: stable

@ -42,14 +42,5 @@ group :opf_plugins do
gem 'grids', path: 'modules/grids'
gem 'openproject-boards', path: 'modules/boards'
#####################################
#
# Remove this before merging into dev!!
#
# We need this for now, to trick Travis as we do not set the ENV variable "OPENPROJECT_EDITION", yet.
ENV['OPENPROJECT_EDITION'] = 'bim'
#####################################
gem 'openproject-bim_seeder', path: 'modules/bim_seeder', require: !!(ENV['OPENPROJECT_EDITION'] == 'bim')
end

@ -34,6 +34,7 @@ set -e
# $1 = TEST_SUITE
# $2 = DB
# $3 = OPENPROJECT_EDITION
run() {
echo $1;
@ -52,6 +53,12 @@ elif [ $2 = "postgres" ]; then
run "cp script/templates/database.travis.postgres.yml config/database.yml"
fi
if [ "$3" = "bim" ]; then
export OPENPROJECT_EDITION="$3";
else
unset OPENPROJECT_EDITION
fi
# run migrations for mysql or postgres
if [ $1 != 'npm' ]; then
run "bundle exec rake db:migrate"

Loading…
Cancel
Save