-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created action to run tests and show results in readme
- Loading branch information
1 parent
4ade1a8
commit d7abf24
Showing
2 changed files
with
47 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
testing: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Dart | ||
uses: dart-lang/setup-dart@v1 | ||
with: | ||
sdk: 'stable' | ||
|
||
- name: Install dependencies | ||
run: dart pub get | ||
|
||
- name: Run tests | ||
run: dart test --coverage=coverage | ||
|
||
- name: Install lcov | ||
run: sudo apt-get install -y lcov | ||
|
||
- name: Generate coverage report | ||
run: | | ||
dart pub global activate coverage | ||
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: coverage/lcov.info | ||
flags: unittests | ||
name: codecov-umbrella | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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