ci: exclude generated code (#58)

This commit is contained in:
Felix Angelov
2023-07-14 15:57:47 -05:00
committed by GitHub
parent 4ceb37dc1e
commit bccee99656
2 changed files with 10 additions and 2 deletions
+9 -2
View File
@@ -55,11 +55,18 @@ runs:
run: dart analyze --fatal-warnings ${{inputs.analyze_directories}}
- name: Test
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: flutter test --coverage
- name: Exclude Generated Code from Coverage
if: ${{ inputs.coverage_excludes != '' }}
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: |
flutter pub global activate coverage
dart test -j ${{inputs.concurrency}} --coverage=coverage --platform=${{inputs.platform}} && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=${{inputs.report_on}} --check-ignore
mv coverage/lcov.info coverage/lcov.info.bak
sudo apt-get -y install lcov
lcov --remove coverage/lcov.info.bak "${{inputs.coverage_excludes}}" -o coverage/lcov.info
- name: Upload Coverage
uses: codecov/codecov-action@v3
+1
View File
@@ -1,6 +1,7 @@
# Shorebird Code Push
[![Discord](https://dcbadge.vercel.app/api/server/shorebird)](https://discord.gg/shorebird)
[![ci](https://github.com/shorebirdtech/updater/actions/workflows/main.yaml/badge.svg)](https://github.com/shorebirdtech/updater/actions/workflows/main.yaml)
[![License: MIT][license_badge]][license_link]