Skip to content

Commit

Permalink
Add test reporting (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 authored Dec 19, 2024
1 parent 42929f5 commit d459019
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
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

0 comments on commit d459019

Please sign in to comment.