{"id":18352485,"url":"https://github.com/stelynx/dart-full-coverage","last_synced_at":"2025-07-22T20:05:00.149Z","repository":{"id":42886873,"uuid":"255097160","full_name":"stelynx/dart-full-coverage","owner":"stelynx","description":"A GitHub Actions action for allowing coverage test tool to see all Dart files","archived":false,"fork":false,"pushed_at":"2023-03-04T11:48:40.000Z","size":401,"stargazers_count":12,"open_issues_count":15,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T02:04:22.134Z","etag":null,"topics":["coverage","dart","flutter","github-action"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/stelynx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2020-04-12T14:14:42.000Z","updated_at":"2025-03-02T00:19:17.000Z","dependencies_parsed_at":"2024-11-05T21:51:04.234Z","dependency_job_id":null,"html_url":"https://github.com/stelynx/dart-full-coverage","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":0.08333333333333337,"last_synced_commit":"fc91fc4cf52e65867c0ad0e54390d0fd4e22f7d8"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/stelynx/dart-full-coverage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelynx%2Fdart-full-coverage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelynx%2Fdart-full-coverage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelynx%2Fdart-full-coverage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelynx%2Fdart-full-coverage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stelynx","download_url":"https://codeload.github.com/stelynx/dart-full-coverage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stelynx%2Fdart-full-coverage/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266563915,"owners_count":23948689,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["coverage","dart","flutter","github-action"],"created_at":"2024-11-05T21:36:08.175Z","updated_at":"2025-07-22T20:05:00.099Z","avatar_url":"https://github.com/stelynx.png","language":"TypeScript","readme":"# Dart Full Coverage\n\n![npm](https://img.shields.io/npm/v/@stelynx/dart-full-coverage)\n![GitHub](https://img.shields.io/github/license/stelynx/dart-full-coverage)\n\nCoverage tools like _codecov_ only see the files that were actually triggered by tests. This means\nthat a coverage of 100% can easily be a lie, e.g. you can just write a dummy test that does not import\nany files and a coverage tool will ignore all the code base.\n\nLuckily, this action resolves this problem.\n\n## How it works\n\nThe _Dart Full Coverage_ action harvests the power of Bash to find all files in specified directory, by\ndefault it is `lib` directory, where all Flutter files are. It then creates a dummy test file\n`test/coverage_helper_test.dart` that imports all the Dart files that were found and has an empty `void main() {}`\nfunction so that it actually starts.\n\n## Using the action\n\nAction has four parameters:\n\n- `package`: The name of your package, the same as you use in imports, e.g. if you import files like\n  `import \"package:egakcap/some_file.dart\";`, then package is `'egakcap'`. This parameter is required.\n- `use_git_root`: Boolean, whether to `cd` into `$GITHUB_WORKSPACE` at the beginning of the script or not. Defaults to true, set `use_git_root: false` to negate.\n- `main_dir`: If `use_git_root` is set to `false`, you can provide the starting directory where the script should `cd` to. If `use_git_root` is set to `false` and you omit this value, the active directory will not be changed.\n- `path`: The relative path to Dart files, by default it is `'lib'`. Path is relative to either `$GITHUB_WORKSPACE`, or provided directory in `main_dir`, or to the directory the action is being executed in.\n- `test_file`: The name of the dummy file the script will create. The name should lead to where your tests are. The default value is `'test/coverage_helper_test.dart'`.\n- `ignore`: A comma-separated list of files to be ignored and not imported in `test_file`. For example, if you want to skip all files that end with \"\\_state.dart\" or the file is called \"do_not_import_me.dart\", then set `ignore` to `'*_state.dart, do_not_import_me.dart'`. By default, none of the files will be ignored.\n\nSo, a typical usage of this action would be similar to the following.\n\n```yaml\nname: \"test\"\non: push\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v1\n      - uses: actions/setup-java@v1\n        with:\n          java-version: \"12.x\"\n      - uses: subosito/flutter-action@v1\n        with:\n          channel: \"stable\"\n      - uses: stelynx/dart-full-coverage@v1.1.1\n        with:\n          package: egakcap\n          ignore: \"*_state.dart, do_not_import_me.dart\"\n      - run: flutter pub get\n      - run: flutter packages pub run build_runner build\n      - run: flutter build aot\n      - run: flutter analyze\n      - run: flutter test --coverage .\n      - uses: codecov/codecov-action@v1.0.2\n        with:\n          token: ${{ secrets.CODECOV_TOKEN }}\n```\n\n## Contributing\n\nEvery contribution is very welcome! Please, see the [CONTRIBUTING guidlines](CONTRIBUTING.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstelynx%2Fdart-full-coverage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstelynx%2Fdart-full-coverage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstelynx%2Fdart-full-coverage/lists"}