Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#461)

Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.0 to 1.5.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dart-lang/setup-dart/releases">dart-lang/setup-dart's releases</a>.</em></p>
<blockquote>
<h2>v1.5.1</h2>
<ul>
<li>No longer test the <code>setup-dart</code> action on pre-2.12 SDKs.</li>
<li>Upgrade JS interop code to use extension types (the new name for inline classes).</li>
<li>The upcoming rename of the <code>be</code> channel to <code>main</code> is now supported with forward compatibility that switches when the rename happens.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md">dart-lang/setup-dart's changelog</a>.</em></p>
<blockquote>
<h2>v1.6.0</h2>
<ul>
<li>Enable provisioning of the latest Dart SDK patch release by specifying just
the major and minor version (e.g. <code>3.2</code>).</li>
</ul>
<h2>v1.5.1</h2>
<ul>
<li>No longer test the <code>setup-dart</code> action on pre-2.12 SDKs.</li>
<li>Upgrade JS interop code to use extension types
(the new name for inline classes).</li>
<li>The upcoming rename of the <code>be</code> channel to <code>main</code> is now supported with
forward compatibility that switches when the rename happens.</li>
</ul>
<h2>v1.5.0</h2>
<ul>
<li>Re-wrote the implementation of the action into Dart.</li>
<li>Auto-detect the platform architecture (<code>x64</code>, <code>ia32</code>, <code>arm</code>, <code>arm64</code>).</li>
<li>Improved the caching and download resilience of the sdk.</li>
<li>Added a new action output: <code>dart-version</code> - the installed version of the sdk.</li>
</ul>
<h2>v1.4.0</h2>
<ul>
<li>Automatically create OIDC token for pub.dev.</li>
<li>Add a reusable workflow for publishing.</li>
</ul>
<h2>v1.3.0</h2>
<ul>
<li>The install location of the Dart SDK is now available
in an environment variable, <code>DART_HOME</code>
(<a href="https://redirect.github.com/dart-lang/setup-dart/issues/43">#43</a>).</li>
<li>Fixed an issue where cached downloads could lead to unzip issues
on self-hosted runners
(<a href="https://redirect.github.com/dart-lang/setup-dart/issues/35">#35</a>).</li>
</ul>
<h2>v1.2.0</h2>
<ul>
<li>Fixed a path issue impacting git dependencies on Windows.</li>
</ul>
<h2>v1.1.0</h2>
<ul>
<li>Added a <code>flavor</code> option setup.sh to allow downloading unpublished builds.</li>
</ul>
<h2>v1.0.0</h2>
<ul>
<li>Promoted to 1.0 stable.</li>
</ul>
<h2>v0.5</h2>
<ul>
<li>Fixed a Windows <code>pub global activate</code> path issue.</li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/dart-lang/setup-dart/commit/8a4b97ea2017cc079571daec46542f76189836b1"><code>8a4b97e</code></a> Support renaming the be channel to main. (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/102">#102</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/0970dcf46e056fb521e7027775fdff076fe1e732"><code>0970dcf</code></a> Bump <code>@​actions/http-client</code> from 2.1.0 to 2.1.1 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/101">#101</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/e58aeb62aef51dcc4d0ba8eada7c08092aad5314"><code>e58aeb6</code></a> updates for the latest version of extension types (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/100">#100</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/deafe40ee7284c48e67c783c88eed8c8b52b19ca"><code>deafe40</code></a> Convert to extension types (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/99">#99</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/cdb51fff2b088939ef86fe041b18e82cb4733522"><code>cdb51ff</code></a> Bump semver from 6.3.0 to 6.3.1 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/98">#98</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/e2fce1213c49504e0029ade4bac39403dfc11fb3"><code>e2fce12</code></a> update JS interop - remove JS typedef references (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/97">#97</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/42c988f214b6652e0b56ca2ad2f1d477bf6098b7"><code>42c988f</code></a> set up a cron to build the action's javascript (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/96">#96</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/007c7cbb377cdbdf8922e2f8c4172dc60fbaaf9a"><code>007c7cb</code></a> blast_repo fixes (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/92">#92</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/08de7e0c9a57cb3229b052af11c7f8eae4a845bd"><code>08de7e0</code></a> Remove annotations no longer needed (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/91">#91</a>)</li>
<li><a href="https://github.com/dart-lang/setup-dart/commit/bd8bef0960777f45de11f484bcb7beacadb321cf"><code>bd8bef0</code></a> Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/89">#89</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/dart-lang/setup-dart/compare/d6a63dab3335f427404425de0fbfed4686d93c4f...8a4b97ea2017cc079571daec46542f76189836b1">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.5.0&new-version=1.5.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
1 file changed
tree: 21f644e979449456df8a414ac1b8dac1bc851998
  1. .github/
  2. benchmark/
  3. bin/
  4. lib/
  5. test/
  6. .gitignore
  7. analysis_options.yaml
  8. AUTHORS
  9. CHANGELOG.md
  10. LICENSE
  11. PATENTS
  12. pubspec.yaml
  13. README.md
README.md

Coverage provides coverage data collection, manipulation, and formatting for Dart.

Build Status Coverage Status Pub

Tools

collect_coverage collects coverage JSON from the Dart VM Service. format_coverage formats JSON coverage data into either LCOV or pretty-printed format.

Install coverage

dart pub global activate coverage

Consider adding the dart pub global run executables directory to your path. See Running a script from your PATH for more details.

Running tests with coverage

For the common use case where you just want to run all your tests, and generate an lcov.info file, you can use the test_with_coverage script:

dart pub global run coverage:test_with_coverage

By default, this script assumes it's being run from the root directory of a package, and outputs a coverage.json and lcov.info file to ./coverage/

This script is essentially the same as running:

dart run --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=8181 test &
dart pub global run coverage:collect_coverage --wait-paused --uri=http://127.0.0.1:8181/ -o coverage/coverage.json --resume-isolates --scope-output=foo
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --lcov -i coverage/coverage.json -o coverage/lcov.info

For more complicated use cases, where you want to control each of these stages, see the sections below.

Collecting coverage from the VM

dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN script.dart
dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates

or if the dart pub global run executables are on your PATH,

collect_coverage --uri=http://... -o coverage.json --resume-isolates

where --uri specifies the Dart VM Service URI emitted by the VM.

If collect_coverage is invoked before the script from which coverage is to be collected, it will wait until it detects a VM observatory to which it can connect. An optional --connect-timeout may be specified (in seconds). The --wait-paused flag may be enabled, causing collect_coverage to wait until all isolates are paused before collecting coverage.

Formatting coverage data

dart pub global run coverage:format_coverage --package=app_package -i coverage.json

or if the dart pub global run exectuables are on your PATH,

format_coverage --package=app_package -i coverage.json

where app_package is the path to the package whose coverage is being collected (defaults to the current working directory). If --sdk-root is set, Dart SDK coverage will also be output.

Ignore lines from coverage

  • // coverage:ignore-line to ignore one line.
  • // coverage:ignore-start and // coverage:ignore-end to ignore range of lines inclusive.
  • // coverage:ignore-file to ignore the whole file.

Function and branch coverage

To gather function level coverage information, pass --function-coverage to collect_coverage:

dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN script.dart
dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --function-coverage

To gather branch level coverage information, pass --branch-coverage to both collect_coverage and the Dart command you're gathering coverage from:

dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN --branch-coverage script.dart
dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --branch-coverage

Branch coverage requires Dart VM 2.17.0, with service API v3.56. Function, branch, and line coverage can all be gathered at the same time, by combining those flags:

dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=NNNN --branch-coverage script.dart
dart pub global run coverage:collect_coverage --uri=http://... -o coverage.json --resume-isolates --function-coverage --branch-coverage

These flags can also be passed to test_with_coverage:

pub global run coverage:test_with_coverage --branch-coverage --function-coverage