From d459019c3c30df7e1c7ee8365a5bee575d058d0f Mon Sep 17 00:00:00 2001 From: Gold87 <91761103+Gold872@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:16:02 -0500 Subject: [PATCH] Add test reporting (#162) --- .github/workflows/elastic-ci.yml | 15 ++++++++++++++- .gitignore | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/elastic-ci.yml b/.github/workflows/elastic-ci.yml index 15a9eb22..29378b47 100644 --- a/.github/workflows/elastic-ci.yml +++ b/.github/workflows/elastic-ci.yml @@ -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 diff --git a/.gitignore b/.gitignore index 569c1226..266efad2 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ migrate_working_dir/ coverage/ *.mocks.dart +reports/ # IntelliJ related *.iml