{"id":19135877,"url":"https://github.com/sonalys/gotestfast","last_synced_at":"2025-05-06T20:06:44.370Z","repository":{"id":248009963,"uuid":"827447843","full_name":"sonalys/gotestfast","owner":"sonalys","description":"A test controller to cache and test prioritize execution.","archived":false,"fork":false,"pushed_at":"2024-07-28T07:31:00.000Z","size":69,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-26T15:59:59.794Z","etag":null,"topics":["go","golang","test","testing","tests"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonalys.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-11T17:03:45.000Z","updated_at":"2025-04-05T17:30:15.000Z","dependencies_parsed_at":"2024-07-11T22:18:46.673Z","dependency_job_id":"eb45a258-2eed-440a-b79d-016f8ba7aef7","html_url":"https://github.com/sonalys/gotestfast","commit_stats":null,"previous_names":["sonalys/gotestfast"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonalys%2Fgotestfast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonalys%2Fgotestfast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonalys%2Fgotestfast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonalys%2Fgotestfast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonalys","download_url":"https://codeload.github.com/sonalys/gotestfast/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252761143,"owners_count":21800124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","test","testing","tests"],"created_at":"2024-11-09T06:32:28.953Z","updated_at":"2025-05-06T20:06:44.339Z","avatar_url":"https://github.com/sonalys.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# *GO TEST FAST*\nA Golang test execution tool that **prioritizes tests that have failed**. Why run pipelines for several minutes just to reach the test that previously failed?\n\nThis tool lists all tests from the given package, prioritizing them in the following order:\n\n1. Tests that have previously failed\n2. New tests that were not present in the previous iteration\n3. All other tests\n\n\u003cbr\u003e\n\n\u003ccenter\u003e\n\n![Output](doc/example01.png)\n\n\u003c/center\u003e\n\n## Features\n\n* Colored and human-readable output\n* JSON output available for CI\n* Caching of previously failing tests for prioritization\n* Prioritizes new tests as well\n* Coverage support\n\n## Usage\n\n### Go Run\n\n```\ngo run github.com/sonalys/gotestfast/entrypoints/gotestfast@latest -help\n\n  -coverprofile string\n        If set, writes a coverage profile to the given file\n  -input string\n        Path to the Go project folder\n  -json\n        Output test results as JSON\n  -output string\n        Path to the output file (default \"testlog.json\")\n  -pkg string\n        Comma separated list of packages to test (default \"./...\")\n```\n\n### Go Install\n\n`go install github.com/sonalys/gotestfast/entrypoints/gotestfast@latest`\n\n`gotestfast -input PROJECT_DIR -output CACHE_FILE -pkg ./...`\n\n### CI\n\nFor CI, please cache the `CACHE_FILE` for the configured `-output` parameter.  \nAlso, set the `-json` flag for JSON logging.\n\n#### Github Actions\n\nAs of the current moment, `actions/cache@v4` `save-always` flag is not working.\nI am using a work-around with two separate steps, and `if: always()`\n\n```\n- name: Restore test-log cache\n  uses: actions/cache/restore@v3\n  with:\n    path: testlog.json\n    key: ${{ runner.os }}-testcache\n    restore-keys: |\n      ${{ runner.os }}-testcache\n\n- name: Test\n  run: make test\n\n- name: Save test-log cache\n  if: always()\n  uses: actions/cache/save@v3\n  with:\n    path: testlog.json\n    key: ${{ runner.os }}-testcache\n```\n\n## Contributions\n\nAny issues or ideas are welcome. Just create a new issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonalys%2Fgotestfast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonalys%2Fgotestfast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonalys%2Fgotestfast/lists"}