Skip to content

Commit

Permalink
Add code cov to test step
Browse files Browse the repository at this point in the history
  • Loading branch information
bdmendes committed Aug 1, 2023
1 parent decfdcc commit 1066db9
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/format_lint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:

jobs:
format:
name: 'Format'
name: "Format"
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -20,7 +20,7 @@ jobs:
- run: dart format $(find . -type f -name "*.dart" -a -not -name "*.g.dart") --set-exit-if-changed

lint:
name: 'Lint'
name: "Lint"
runs-on: ubuntu-latest
needs: format
defaults:
Expand All @@ -31,7 +31,7 @@ jobs:
- uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'zulu'
distribution: "zulu"
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
Expand All @@ -46,7 +46,7 @@ jobs:
- run: flutter analyze .

test:
name: 'Test'
name: "Test"
runs-on: ubuntu-latest
needs: lint
defaults:
Expand All @@ -57,9 +57,17 @@ jobs:
- uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'zulu'
distribution: "zulu"
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}

- run: flutter test --no-sound-null-safety
- name: Test with coverage
run: flutter test --coverage --coverage=./coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage/lcov.info

0 comments on commit 1066db9

Please sign in to comment.