codecov #16
Workflow file for this run
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Dart | |
on: | |
pull_request: | |
branches: [ "main" ] | |
paths: | |
- 'lib/**' | |
- '.github/**' | |
push: | |
branches: [ "main" ] | |
paths: | |
- '.github/**' | |
jobs: | |
checkout: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
# Note: This workflow uses the latest stable version of the Dart SDK. | |
# You can specify other versions if desired, see documentation here: | |
# https://github.com/dart-lang/setup-dart/blob/main/README.md | |
# - uses: dart-lang/setup-dart@v1 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
flutter-version: 3.24.3 | |
- name: Install dependencies | |
run: flutter pub get | |
# Uncomment this step to verify the use of 'dart format' on each commit. | |
# - name: Verify formatting | |
# run: dart format --output=none --set-exit-if-changed . | |
- name: Install lcov | |
run: sudo apt-get install -y lcov | |
# Consider passing '--fatal-infos' for slightly stricter analysis. | |
- name: Run tests with coverage | |
run: | | |
flutter test --coverage | |
lcov --directory coverage --capture --output-file coverage/lcov.info | |
- name: Check Code Coverage | |
uses: VeryGoodOpenSource/very_good_coverage@v3.0.0 | |
with: | |
path: coverage/lcov.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Analyze project source | |
run: flutter analyze --fatal-infos --fatal-warnings lib/ test/ | |
# Your project will need to have tests in test/ and a dependency on | |
# package:test for this step to succeed. Note that Flutter projects will | |
# want to change this to 'flutter test'. | |