Skip to content

ci: change run test command to add coverage lcov.info #7

ci: change run test command to add coverage lcov.info

ci: change run test command to add coverage lcov.info #7

Workflow file for this run

name: Code Coverage Update
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
channel: "stable"
- name: Install dependencies
run: flutter pub get
working-directory: pokedex
- name: Run tests
run: |
flutter test --coverage --reporter github
# Ensure coverage for all files
lcov --list coverage/lcov.info # To verify before editing lcov
if [ -f coverage/lcov.info ]; then
lcov --add-tracefile coverage/lcov.info --output-file coverage/lcov.info
lcov --remove coverage/lcov.info 'test/*' --output-file coverage/lcov.info
lcov --list coverage/lcov.info # To see the changes
fi
working-directory: pokedex
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}