diff --git a/.github/workflows/format_lint_test.yaml b/.github/workflows/format_lint_test.yaml index b2ea92c9d..34f752778 100644 --- a/.github/workflows/format_lint_test.yaml +++ b/.github/workflows/format_lint_test.yaml @@ -65,4 +65,11 @@ jobs: with: flutter-version: ${{ env.FLUTTER_VERSION }} - - run: flutter test --no-sound-null-safety + - name: Test with coverage + run: flutter test --coverage + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true diff --git a/README.md b/README.md index e90beac33..4387ae5cb 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ [![Build badge](https://img.shields.io/github/actions/workflow/status/NIAEFEUP/uni/format_lint_test.yaml?style=for-the-badge&branch=develop)](https://github.com/NIAEFEUP/uni/actions) [![Deploy badge](https://img.shields.io/github/actions/workflow/status/NIAEFEUP/uni/deploy.yaml?label=Deploy&style=for-the-badge&branch=develop)](https://github.com/NIAEFEUP/uni/actions) +[![Codecov branch](https://img.shields.io/codecov/c/github/NIAEFEUP/uni/develop?style=for-the-badge)](https://app.codecov.io/gh/NIAEFEUP/uni/) [![style: very good analysis](https://img.shields.io/badge/style-very_good_analysis-B22C89.svg?style=for-the-badge)](https://pub.dev/packages/very_good_analysis) [![License badge](https://img.shields.io/github/license/NIAEFEUP/uni?style=for-the-badge)](https://github.com/NIAEFEUP/uni/blob/develop/LICENSE) diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..25d8f819f --- /dev/null +++ b/codecov.yml @@ -0,0 +1,8 @@ +ignore: + - "**/*.g.dart" +comment: + layout: "diff, flags, files" + behavior: default + require_changes: false + require_base: false + require_head: true diff --git a/uni/analysis_options.yaml b/uni/analysis_options.yaml index be33d4712..92d895f92 100644 --- a/uni/analysis_options.yaml +++ b/uni/analysis_options.yaml @@ -3,8 +3,7 @@ include: package:very_good_analysis/analysis_options.yaml analyzer: # Exclude auto-generated files from dart analysis exclude: - - '**.g.dart' - - '**.freezed.dart' + - "**.g.dart" # Custom linter rules. A list of all rules can be found at # https://dart-lang.github.io/linter/lints/options/options.html @@ -13,4 +12,3 @@ linter: public_member_api_docs: false avoid_equals_and_hash_code_on_mutable_classes: false one_member_abstracts: false -