parent
0dc266d9fc
commit
8685297780
|
@ -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
|
Loading…
Reference in New Issue