From 23016012de345ed9e36d83e7923015e0cfde711b Mon Sep 17 00:00:00 2001 From: David Zuelke Date: Wed, 14 Feb 2024 06:21:11 +0100 Subject: [PATCH] Split ci_frameworks_spec into two Those are the slowest tests, so it helps a lot with overall time and with parallelization --- test/spec/ci_frameworks-a_spec.rb | 20 +++++++++++++++++++ ...eworks_spec.rb => ci_frameworks-k_spec.rb} | 5 +---- .../log/parallel_runtime_rspec.heroku-20.log | 3 ++- .../log/parallel_runtime_rspec.heroku-22.log | 3 ++- 4 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 test/spec/ci_frameworks-a_spec.rb rename test/spec/{ci_frameworks_spec.rb => ci_frameworks-k_spec.rb} (85%) diff --git a/test/spec/ci_frameworks-a_spec.rb b/test/spec/ci_frameworks-a_spec.rb new file mode 100644 index 0000000000..1d499fdb11 --- /dev/null +++ b/test/spec/ci_frameworks-a_spec.rb @@ -0,0 +1,20 @@ +require_relative "spec_helper" + +describe "A PHP application on Heroku CI" do + { + "atoum": "atoum", + "Behat": "behat", + "Codeception": "codecept run", + }.each do |name, command| + context "using the #{name} CI framework" do + let(:app) { + new_app_with_stack_and_platrepo("test/fixtures/ci/#{name.downcase}") + } + it "automatically executes '#{command}'" do + app.run_ci do |test_run| + expect(test_run.output).to match("#{name} found, executing '#{command}'...") + end + end + end + end +end diff --git a/test/spec/ci_frameworks_spec.rb b/test/spec/ci_frameworks-k_spec.rb similarity index 85% rename from test/spec/ci_frameworks_spec.rb rename to test/spec/ci_frameworks-k_spec.rb index fc79bb0ee3..8568b2d1c1 100644 --- a/test/spec/ci_frameworks_spec.rb +++ b/test/spec/ci_frameworks-k_spec.rb @@ -2,11 +2,8 @@ describe "A PHP application on Heroku CI" do { - "Codeception": "codecept run", - "Behat": "behat", - "PHPSpec": "phpspec run", - "atoum": "atoum", "Kahlan": "kahlan", + "PHPSpec": "phpspec run", "PHPUnit": "phpunit", }.each do |name, command| context "using the #{name} CI framework" do diff --git a/test/var/log/parallel_runtime_rspec.heroku-20.log b/test/var/log/parallel_runtime_rspec.heroku-20.log index 2456c8f189..561c4a11bf 100644 --- a/test/var/log/parallel_runtime_rspec.heroku-20.log +++ b/test/var/log/parallel_runtime_rspec.heroku-20.log @@ -1,7 +1,8 @@ test/spec/blackfire-buildpackagent_spec.rb:100 test/spec/blackfire-herokuagent_spec.rb:120 test/spec/bugs_spec.rb:30 -test/spec/ci_frameworks_spec.rb:190 +test/spec/ci_frameworks-a_spec.rb:120 +test/spec/ci_frameworks-k_spec.rb:120 test/spec/ci_spec.rb:125 test/spec/composer-1_spec.rb:50 test/spec/composer-2_spec.rb:90 diff --git a/test/var/log/parallel_runtime_rspec.heroku-22.log b/test/var/log/parallel_runtime_rspec.heroku-22.log index 2ed0092836..bac088fb8c 100644 --- a/test/var/log/parallel_runtime_rspec.heroku-22.log +++ b/test/var/log/parallel_runtime_rspec.heroku-22.log @@ -1,7 +1,8 @@ test/spec/blackfire-buildpackagent_spec.rb:100 test/spec/blackfire-herokuagent_spec.rb:120 test/spec/bugs_spec.rb:30 -test/spec/ci_frameworks_spec.rb:190 +test/spec/ci_frameworks-a_spec.rb:120 +test/spec/ci_frameworks-k_spec.rb:120 test/spec/ci_spec.rb:125 test/spec/composer-2_spec.rb:90 test/spec/devcenter_spec.rb:5