mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-06 05:30:02 +01:00
Add initial work towards checking that all goldens are used
This commit is contained in:
parent
1deb3cffc6
commit
d8b9d77213
2
.github/workflows/go-test.yml
vendored
2
.github/workflows/go-test.yml
vendored
@ -112,6 +112,7 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, macos-14]
|
||||
fail-fast: false
|
||||
needs: test
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up Go
|
||||
@ -126,3 +127,4 @@ jobs:
|
||||
echo ---
|
||||
ls *
|
||||
# TODO: Actually do this check that was reverted in 06cc3eedbc5be6a09dbc3f274adcacd875eb25a8
|
||||
go run client/posttest/main.go check-goldens
|
||||
|
2
Makefile
2
Makefile
@ -9,7 +9,7 @@ forcetest: ## Force running all tests without a test cache
|
||||
make test
|
||||
|
||||
test: ## Run all tests
|
||||
TZ='America/Los_Angeles' HISHTORY_TEST=1 HISHTORY_SKIP_INIT_IMPORT=1 gotestsum --packages ./... --rerun-fails=10 --rerun-fails-max-failures=30 --format testname --jsonfile /tmp/testrun.json --post-run-command "go run client/posttest/main.go" -- -p 1 -timeout 90m
|
||||
TZ='America/Los_Angeles' HISHTORY_TEST=1 HISHTORY_SKIP_INIT_IMPORT=1 gotestsum --packages ./... --rerun-fails=10 --rerun-fails-max-failures=30 --format testname --jsonfile /tmp/testrun.json --post-run-command "go run client/posttest/main.go export" -- -p 1 -timeout 90m
|
||||
|
||||
ftest: ## Run a specific test specified via `make ftest FILTER=TestParam/testTui/color`
|
||||
go clean -testcache
|
||||
|
@ -29,8 +29,12 @@ var UNUSED_GOLDENS []string = []string{"TestTui-Exit", "testControlR-ControlC-ba
|
||||
"TestTui-DefaultColorScheme", "TestTui-ColoredOutputWithDefaultFilter"}
|
||||
|
||||
func main() {
|
||||
exportMetrics()
|
||||
checkGoldensUsed()
|
||||
if os.Args[1] == "export" {
|
||||
exportMetrics()
|
||||
}
|
||||
if os.Args[1] == "check-goldens" {
|
||||
checkGoldensUsed()
|
||||
}
|
||||
}
|
||||
|
||||
func checkGoldensUsed() {
|
||||
|
Loading…
Reference in New Issue
Block a user