act 0.2.10 (new formula)

Closes #58193.

Signed-off-by: chenrui <chenrui333@gmail.com>
master
Dario Vladovic 2020-07-18 21:05:12 +02:00 committed by chenrui
parent 0dc266d9fc
commit 8685297780
1 changed files with 28 additions and 0 deletions

28
Formula/act.rb Normal file
View File

@ -0,0 +1,28 @@
class Act < Formula
desc "Run your GitHub Actions locally 🚀"
homepage "https://github.com/nektos/act"
url "https://github.com/nektos/act/archive/v0.2.10.tar.gz"
sha256 "1e4d371cfa6aec7e350927e55c3ac8413dbf6e23edbb811ebe2d587dbf136928"
license "MIT"
depends_on "go" => :build
def install
system "make", "build", "VERSION=#{version}"
bin.install "dist/local/act"
end
test do
system "git", "clone", "https://github.com/stefanzweifel/laravel-github-actions-demo.git"
cd "laravel-github-actions-demo" do
system "git", "checkout", "v2.0"
pull_request_jobs = shell_output("#{bin}/act pull_request --list")
assert_match "php-cs-fixer", pull_request_jobs
push_jobs = shell_output("#{bin}/act push --list")
assert_match "phpinsights", push_jobs
assert_match "phpunit", push_jobs
end
end
end