File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ class ActionDocs < Formula
2+ desc "Generate docs for GitHub actions"
3+ homepage "https://github.com/npalm/action-docs"
4+ url "https://registry.npmjs.org/action-docs/-/action-docs-2.5.0.tgz"
5+ sha256 "109170e521e4096b571932a6c0af640db48d1d82c3023488c70f0c909787792e"
6+ license "MIT"
7+
8+ bottle do
9+ sha256 cellar : :any_skip_relocation , all : "abd1926961e5319b5400d918b66417b6e187855983f47f2182d2de1fe7d699af"
10+ end
11+
12+ depends_on "node"
13+
14+ def install
15+ system "npm" , "install" , *std_npm_args
16+ bin . install_symlink Dir [ "#{ libexec } /bin/*" ]
17+ end
18+
19+ test do
20+ test_file = testpath /"action.yml"
21+ test_file . write <<~YAML
22+ ---
23+ name: "Example name"
24+ description: "Example action description"
25+ author: "Example action author"
26+ inputs:
27+ example:
28+ description: "Example input description"
29+ required: false
30+ runs:
31+ using: "composite"
32+ steps:
33+ - id: random-number-generator
34+ run: echo "random-id=$(echo $RANDOM)" >> $GITHUB_OUTPUT
35+ shell: bash
36+ YAML
37+
38+ output = shell_output ( "#{ bin } /action-docs --source #{ test_file } " )
39+ assert_match "Example input description" , output
40+
41+ assert_match version . to_s , shell_output ( "#{ bin } /action-docs --version" )
42+ end
43+ end
You can’t perform that action at this time.
0 commit comments