-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #706 from heroku/ci-herokurun-speedups
CI speed-ups GUS-W-15212157
- Loading branch information
Showing
21 changed files
with
589 additions
and
429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
--format progress | ||
--format ParallelTests::RSpec::RuntimeLogger --out parallel_runtime_rspec.log | ||
--format json --out test/var/log/group.<%= "%02d" % ENV["TEST_ENV_NUMBER"] %>.json | ||
--format ParallelTests::RSpec::RuntimeLogger --out test/var/log/parallel_runtime_rspec.log |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
<?php | ||
|
||
ini_set("assert.exception", 1); | ||
assert(true == false, "Expected true to be false"); | ||
|
||
try { | ||
assert(true == false, "Expected true to be false"); | ||
exit(1); | ||
} catch(AssertionError $e) { | ||
fputs(STDERR, "Caught expected AssertionError"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
require_relative "spec_helper" | ||
|
||
describe "A PHP application intended for Composer 1", :stack => "heroku-20" do | ||
context "with a composer.lock generated by an old version of Composer" do | ||
it "builds using Composer 1.x and prints a notice" do | ||
new_app_with_stack_and_platrepo('test/fixtures/composer/basic_lock_oldv1').deploy do |app| | ||
expect(app.output).to match(/No Composer plugin-api-version recorded/) | ||
expect(app.output).to match(/- composer \(1/) | ||
expect(app.output).to match(/Composer version 1/) | ||
end | ||
end | ||
end | ||
context "with a composer.lock generated by a late version 1 of Composer" do | ||
before(:all) do | ||
@app = new_app_with_stack_and_platrepo('test/fixtures/composer/basic_lock_v1') | ||
@app.deploy | ||
end | ||
|
||
after(:all) do | ||
@app.teardown! | ||
end | ||
|
||
it "builds using Composer 1.x" do | ||
expect(@app.output).to match(/- composer \(1/) | ||
expect(@app.output).to match(/Composer version 1/) | ||
end | ||
|
||
context "with a malformed COMPOSER_AUTH env var" do | ||
it "still boots" do | ||
# config test is enough, it's past any uses of composer on startup | ||
cmds = ['heroku-php-apache2', 'heroku-php-nginx'].map { |script| "#{script} -t" } | ||
retry_until retry: 3, sleep: 5 do | ||
expect_exit(code: 0) { @app.run("( set -e; #{cmds.join('; ')}; )", :return_obj => true, :heroku => {:env => "COMPOSER_AUTH=malformed"}) } | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
require_relative "spec_helper" | ||
|
||
describe "A PHP application intended for Composer 2" do | ||
context "with a composer.lock generated by version 2.2 of Composer" do | ||
it "builds using Composer 2.2" do | ||
new_app_with_stack_and_platrepo('test/fixtures/composer/basic_lock_v2lts').deploy do |app| | ||
expect(app.output).to match(/- composer \(2\.2\./) | ||
expect(app.output).to match(/Composer version 2\.2\./) | ||
end | ||
end | ||
end | ||
context "with a composer.lock generated by version 2.3 of Composer" do | ||
before(:all) do | ||
@app = new_app_with_stack_and_platrepo('test/fixtures/composer/basic_lock_v2') | ||
@app.deploy | ||
end | ||
|
||
after(:all) do | ||
@app.teardown! | ||
end | ||
|
||
it "builds using Composer 2.3 or later" do | ||
expect(@app.output).to match(/- composer \(2\.([3-9]|\d{2,})\./) | ||
expect(@app.output).to match(/Composer version 2\.([3-9]|\d{2,}\.)/) | ||
end | ||
|
||
context "with a malformed COMPOSER_AUTH env var" do | ||
it "still boots" do | ||
# config test is enough, it's past any uses of composer on startup | ||
cmds = ['heroku-php-apache2', 'heroku-php-nginx'].map { |script| "#{script} -t" } | ||
retry_until retry: 3, sleep: 5 do | ||
expect_exit(code: 0) { @app.run("( set -e; #{cmds.join('; ')}; )", :return_obj => true, :heroku => {:env => "COMPOSER_AUTH=malformed"}) } | ||
end | ||
end | ||
end | ||
end | ||
context "with a composer.lock generated by a future version 2 of Composer" do | ||
it "builds using Composer 2.3 or later" do | ||
new_app_with_stack_and_platrepo('test/fixtures/composer/basic_lock_v2.999').deploy do |app| | ||
expect(app.output).to match(/- composer \(2\.([3-9]|\d{2,})\./) | ||
expect(app.output).to match(/Composer version 2\.([3-9]|\d{2,}\.)/) | ||
end | ||
end | ||
end | ||
context "with only an index.php" do | ||
it "builds using Composer 2.2" do | ||
new_app_with_stack_and_platrepo('test/fixtures/default').deploy do |app| | ||
expect(app.output).to match(/- composer \(2\.2\./) | ||
expect(app.output).to match(/Composer version 2\.2\./) | ||
end | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.