Gate alpha8 release on full Ruby matrix

This commit is contained in:
2026-07-20 15:34:33 -07:00
parent 49a161632e
commit f4bf4eb625
5 changed files with 50 additions and 2 deletions

View File

@@ -16,4 +16,9 @@ class ReadmeContractTest < Minitest::Test
assert_includes README, "not configured as of `0.0.1.alpha7`"
assert_includes README, "does not currently guarantee publication"
end
def test_compatibility_documents_every_runtime_dependency
assert_includes README, "`activesupport (>= 6.1, < 9.0)`"
assert_includes README, "`marcel (~> 1.0)`"
end
end

View File

@@ -17,6 +17,10 @@ class ReleaseWorkflowTest < Minitest::Test
workflow.fetch("jobs").fetch("push")
end
def verify_job
workflow.fetch("jobs").fetch("verify")
end
def test_release_job_is_inert_on_non_github_runners
assert_equal "${{ github.server_url == 'https://github.com' }}", push_job.fetch("if")
end
@@ -61,4 +65,15 @@ class ReleaseWorkflowTest < Minitest::Test
assert_operator test_index, :<, publish_index
assert_equal "bundle exec rake test", steps.fetch(test_index).fetch("run")
end
def test_release_verifies_the_supported_matrix_and_installed_gem_before_publish
assert_equal %w[3.2 3.3 3.4 4.0], verify_job.dig("strategy", "matrix", "ruby")
assert_equal "verify", push_job.fetch("needs")
commands = verify_job.fetch("steps").filter_map { |step| step["run"] }.join("\n")
assert_includes commands, "bundle exec rake test"
assert_includes commands, "gem build opencode-ruby.gemspec"
assert_includes commands, "gem install opencode-ruby-*.gem --no-document"
assert_includes commands, "ruby -ropencode-ruby"
end
end

View File

@@ -27,7 +27,7 @@ class WorkflowContractTest < Minitest::Test
workflow_uses(workflow)
end
assert_equal 5, action_uses.length
assert_equal 7, action_uses.length
action_uses.each do |action_use|
action, separator, revision = action_use.rpartition("@")