-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
lake check-test
check before running lake test
- Loading branch information
1 parent
aa36d3b
commit dd672a2
Showing
3 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
echo "::group::Lake Test" | ||
# Get the directory of the script | ||
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" | ||
|
||
# use `lake check-test` to determine if the project has a test runner available | ||
# TODO: add a more helpful error message once the test frame work matures | ||
if ! lake check-test; then | ||
echo "::error::lake check-test failed: could not find a test runner" | ||
cat "$SCRIPT_DIR"/step_summaries/lake_check_error.md >> "$GITHUB_STEP_SUMMARY" | ||
exit 1 | ||
fi | ||
|
||
lake test | ||
|
||
echo "::endgroup::" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
### `lake check-test` failed | ||
`lake check-test` could not find a test runner. Add script or lean_exe tagged `@[test_runner]` in the workspace's root package. |