Merge pull request #8552 from opf/housekeeping/integrate-plugin-specs

[33443 Integrate plugin specs / features into common group
pull/8559/head
ulferts 4 years ago committed by GitHub
commit b0ef334f45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 59
      .travis.yml
  2. 37
      lib/tasks/parallel_testing.rake

@ -90,68 +90,67 @@ jobs:
- bash script/ci/runner.sh npm
- stage: test
name: 'spec_legacy (1/1)'
name: 'legacy specs + cukes (1/1)'
script:
- bash script/ci/setup.sh spec_legacy
- bash script/ci/runner.sh spec_legacy 1 1
- bash script/ci/runner.sh plugins:cucumber 1 1
- stage: test
name: 'units (1/4)'
name: 'units (1/5)'
script:
- bash script/ci/setup.sh units
- bash script/ci/runner.sh units 4 1
- bash script/ci/runner.sh units 5 1
- stage: test
name: 'units (2/4)'
name: 'units (2/5)'
script:
- bash script/ci/setup.sh units
- bash script/ci/runner.sh units 4 2
- bash script/ci/runner.sh units 5 2
- stage: test
name: 'units (3/4)'
name: 'units (3/5)'
script:
- bash script/ci/setup.sh units
- bash script/ci/runner.sh units 4 3
- bash script/ci/runner.sh units 5 3
- stage: test
name: 'units (4/4)'
name: 'units (4/5)'
script:
- bash script/ci/setup.sh units
- bash script/ci/runner.sh units 4 4
- bash script/ci/runner.sh units 5 4
- stage: test
name: 'features (1/4)'
name: 'units (5/5)'
script:
- bash script/ci/setup.sh features
- bash script/ci/runner.sh features 4 1
- bash script/ci/setup.sh units
- bash script/ci/runner.sh units 5 5
- stage: test
name: 'features (2/4)'
name: 'features (1/6)'
script:
- bash script/ci/setup.sh features
- bash script/ci/runner.sh features 4 2
- bash script/ci/runner.sh features 6 1
- stage: test
name: 'features (3/4)'
name: 'features (2/6)'
script:
- bash script/ci/setup.sh features
- bash script/ci/runner.sh features 4 3
- bash script/ci/runner.sh features 6 2
- stage: test
name: 'features (4/4)'
name: 'features (3/6)'
script:
- bash script/ci/setup.sh features
- bash script/ci/runner.sh features 4 4
- bash script/ci/runner.sh features 6 3
- stage: test
name: 'plugins:units (1/1)'
name: 'features (4/6)'
script:
- bash script/ci/setup.sh plugins:units
- bash script/ci/runner.sh plugins:units 1 1
if: head_branch !~ /^core\//
- bash script/ci/setup.sh features
- bash script/ci/runner.sh features 6 4
- stage: test
name: 'plugins:features (1/1)'
name: 'features (5/6)'
script:
- bash script/ci/setup.sh plugins:features
- bash script/ci/runner.sh plugins:features 1 1
if: head_branch !~ /^core\//
- bash script/ci/setup.sh features
- bash script/ci/runner.sh features 6 5
- stage: test
name: 'plugins:cucumber (1/1)'
name: 'features (6/6)'
script:
- bash script/ci/setup.sh plugins:cucumber
- bash script/ci/runner.sh plugins:cucumber 1 1
if: head_branch !~ /^core\//
- bash script/ci/setup.sh features
- bash script/ci/runner.sh features 6 6
addons:
chrome: stable

@ -57,6 +57,21 @@ namespace :parallel do
group_options
end
##
# Returns all spec folder paths
# of the core, modules and plugins
def all_spec_paths
spec_folders = ['spec'] + Plugins::LoadPathHelper.spec_load_paths
spec_folders.join(' ')
end
##
# Returns all spec folder paths
# of the core, modules and plugins
def plugin_spec_paths
Plugins::LoadPathHelper.spec_load_paths.join(' ')
end
def run_specs(parsed_options, folders, pattern = '', additional_options: nil)
check_for_pending_migrations
@ -103,12 +118,10 @@ namespace :parallel do
desc 'Run plugin specs in parallel'
task specs: [:environment] do
spec_folders = Plugins::LoadPathHelper.spec_load_paths.join(' ')
ParallelParser.with_args(ARGV) do |options|
ARGV.each { |a| task(a.to_sym) {} }
run_specs options, spec_folders
run_specs options, plugin_spec_paths
end
end
@ -116,12 +129,10 @@ namespace :parallel do
task units: [:environment] do
pattern = "--pattern 'spec/(?!features\/)'"
spec_folders = Plugins::LoadPathHelper.spec_load_paths.join(' ')
ParallelParser.with_args(ARGV) do |options|
ARGV.each { |a| task(a.to_sym) {} }
run_specs options, spec_folders, pattern
run_specs options, plugin_spec_paths, pattern
end
end
@ -129,12 +140,10 @@ namespace :parallel do
task features: [:environment] do
pattern = "--pattern 'spec\/features'"
spec_folders = Plugins::LoadPathHelper.spec_load_paths.join(' ')
ParallelParser.with_args(ARGV) do |options|
ARGV.each { |a| task(a.to_sym) {} }
run_specs options, spec_folders, pattern
run_specs options, plugin_spec_paths, pattern
end
end
@ -164,29 +173,29 @@ namespace :parallel do
ParallelParser.with_args(ARGV) do |options|
ARGV.each { |a| task(a.to_sym) {} }
run_specs options, 'spec'
run_specs options, all_spec_paths
end
end
desc 'Run feature specs in parallel'
task features: [:environment] do
pattern = "--pattern '^spec\/features\/'"
pattern = "--pattern 'spec\/features\/'"
ParallelParser.with_args(ARGV) do |options|
ARGV.each { |a| task(a.to_sym) {} }
run_specs options, 'spec', pattern
run_specs options, all_spec_paths, pattern
end
end
desc 'Run unit specs in parallel'
task units: [:environment] do
pattern = "--pattern '^spec/(?!features\/)'"
pattern = "--pattern 'spec/(?!features\/)'"
ParallelParser.with_args(ARGV) do |options|
ARGV.each { |a| task(a.to_sym) {} }
run_specs options, 'spec', pattern
run_specs options, all_spec_paths, pattern
end
end
end

Loading…
Cancel
Save