stepci 2.6.0 (new formula)

Closes #118931.

Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Patrick Linnane <patrick@linnane.io>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
master
Rui Chen 2022-12-25 12:12:03 -05:00 committed by BrewTestBot
parent 647680a823
commit 25f45749b3
No known key found for this signature in database
GPG Key ID: 82D7D104050B0F0F
1 changed files with 47 additions and 0 deletions

47
Formula/stepci.rb Normal file
View File

@ -0,0 +1,47 @@
require "language/node"
class Stepci < Formula
desc "API Testing and Monitoring made simple"
homepage "https://stepci.com"
url "https://registry.npmjs.org/stepci/-/stepci-2.6.0.tgz"
sha256 "e30ffbac5205ace4aa4bd6dd07a7e659a068c4d7c38255ca0faf3d7eb4b2bdec"
license "MPL-2.0"
depends_on "node"
def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end
test do
# https://docs.stepci.com/legal/privacy.html
ENV["STEPCI_DISABLE_ANALYTICS"] = "1"
(testpath/"workflow.yml").write <<~EOS
version: "1.1"
name: Status Check
env:
host: example.com
tests:
example:
steps:
- name: GET request
http:
url: https://${{env.host}}
method: GET
check:
status: /^20/
EOS
expected = <<~EOS
PASS example
Tests: 0 failed, 1 passed, 1 total
Steps: 0 failed, 0 skipped, 1 passed, 1 total
EOS
assert_match expected, shell_output("#{bin}/stepci run workflow.yml")
assert_match version.to_s, shell_output("#{bin}/stepci --version")
end
end