diff --git a/.github/workflows/elastic-ci.yml b/.github/workflows/elastic-ci.yml index 15a9eb2..29378b4 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 569c122..266efad 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ migrate_working_dir/ coverage/ *.mocks.dart +reports/ # IntelliJ related *.iml