Skip to content

Commit

Permalink
CI: Add codecov support
Browse files Browse the repository at this point in the history
  • Loading branch information
rkishan516 committed Dec 7, 2024
1 parent 556217a commit 55f7721
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
with:
fetch-depth: 2
- uses: subosito/[email protected]
with:
channel: stable
- name: Add pub cache bin to PATH
run: echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
- name: Add pub cache to PATH
run: echo "PUB_CACHE="$HOME/.pub-cache"" >> $GITHUB_ENV
- name: Install dependencies
run: flutter pub get
- name: Check format
run: dart format --set-exit-if-changed .
- name: Analyze
run: flutter analyze
- name: Run tests
run: flutter test --coverage
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: coverage/locv.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

FlexibleText is a Flutter widget that allows you to seamlessly mix and match rich text segments and widgets within a single text block. Customize your text with different styles and gestures, and insert inline widgets using simple placeholders. This powerful and flexible solution makes it easy to create dynamic, interactive, and visually appealing text in your Flutter applications.

[![codecov](https://codecov.io/github/rkishan516/flexible_text/graph/badge.svg?token=BNO884O5HM)](https://codecov.io/github/rkishan516/flexible_text)

<a href="https://pub.dev/packages/flexible_text" target="_blank">
<img src="https://img.shields.io/pub/v/flexible_text.svg?style=for-the-badge&label=pub&logo=dart"/>
</a>
Expand Down
19 changes: 19 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
codecov:
require_ci_to_pass: true

coverage:
precision: 2
round: down
range: "70...100"

parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no

# excluding examples from the coverage report
ignore:
- "examples"

0 comments on commit 55f7721

Please sign in to comment.