Skip to content

trigger: run codecov workflow to generate initial coverage report #13

trigger: run codecov workflow to generate initial coverage report

trigger: run codecov workflow to generate initial coverage report #13

Workflow file for this run

name: Flutter CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
analyze-and-test:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Flutter pub get
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Run tests with coverage
shell: pwsh
run: |
$hasTests = (Get-ChildItem -Path "test" -Recurse -File -ErrorAction SilentlyContinue | Measure-Object).Count -gt 0
if ($hasTests) {
flutter test --coverage
} else {
Write-Host "No tests detected in /test, skipping flutter test."
}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
flags: flutter
name: flutter-coverage
fail_ci_if_error: false