Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Junit test reporting #162

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/elastic-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,30 @@ jobs:
- name: Install dependencies
run: flutter pub get

- name: Install junit reporter
run: dart pub global activate junitreport

- name: Generate mocks
run: dart run build_runner build

- name: Run tests
run: flutter test --coverage
run: flutter test --coverage --file-reporter json:reports/test-report.json

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

- name: Generate junit report xml
run: dart pub global run junitreport:tojunit --input reports/test-report.json --output reports/junit-report.xml

- name: Upload test reports to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
files: reports/junit-report.xml
token: ${{ secrets.CODECOV_TOKEN }}
build:
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
migrate_working_dir/
coverage/
*.mocks.dart
reports/

# IntelliJ related
*.iml
Expand Down