Conversation
| livecheck do | ||
| url :stable | ||
| strategy :github_latest | ||
| end |
There was a problem hiding this comment.
There's no need to specify livecheck block unless the default strategy doesn't work as expected
There was a problem hiding this comment.
is there a way to validate if default strategy works? am I to remove this livecheck?
There was a problem hiding this comment.
You can check it by running brew livecheck forgecode. In this specific case it should be fine to just remove the block
There was a problem hiding this comment.
or brew livecheck --autobump forgecode
| end | ||
|
|
||
| test do | ||
| assert_match "Version:", shell_output("#{bin}/forge banner 2>&1") |
There was a problem hiding this comment.
| assert_match "Version:", shell_output("#{bin}/forge banner 2>&1") | |
| assert_match version.to_s, shell_output("#{bin}/forge banner 2>&1") |
Homebrew requires a simple test that checks if a program can do basic stuff correctly. From Formula Cookbook:
We want tests that don’t require any user input and test the basic functionality of the application. For example
foo build-foo input.foois a good test and (despite their widespread use)foo --versionandfoo --helpare bad tests. However, a bad test is better than no test at all.
If software requires credentials (f.e. LLM provider API key):
If the software cannot function without credentials or requires a virtual machine, docker instance, etc. to run, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected. This is preferred over mocking a dependency.
There was a problem hiding this comment.
During first run, forge shows an AI selection TUI. I'm not sure how to check against it
There was a problem hiding this comment.
Maybe it's possible to select LLM model by providing cli-args/via environment variables? Also you can try to use Open3.popen3 to write/read from stdin and stdout. If nether of these is possible, please add a comment (something like # forgecode is a TUI application)
|
now it |
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>?brew test <formula>?brew audit --strict <formula>(after doingHOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it passbrew audit --new <formula>?