diff --git a/.github/actions/dart-test/action.yml b/.github/actions/dart-test/action.yml index cd4fd6c2a1..6e96832f09 100644 --- a/.github/actions/dart-test/action.yml +++ b/.github/actions/dart-test/action.yml @@ -22,16 +22,26 @@ runs: shell: bash working-directory: ${{ inputs.directory }} + - name: Install flutter_junitreport + shell: bash + run: | + if [[ "${{ matrix.sdk }}" != 3.5* ]]; then + dart pub global activate --source git https://github.com/waffiqaziz/flutter-junitreport.git --git-ref main + fi + - name: Test VM working-directory: ${{ inputs.directory }} shell: bash run: | testCmd="dart test -p vm --test-randomize-ordering-seed=random --chain-stack-traces" - if ${{ (matrix.os == 'ubuntu' && matrix.sdk == 'stable' && 'true') || 'false' }} ; then - $testCmd --coverage=coverage + if [ "${{ matrix.sdk }}" = "stable" ]; then + $testCmd --coverage=coverage --reporter json > test-vm.jsonl dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib else - $testCmd + $testCmd --reporter json > test-vm.jsonl + fi + if [[ "${{ matrix.sdk }}" != 3.5* ]]; then + dart pub global run flutter_junitreport:tojunit --input test-vm.jsonl --output TEST-vm-junit.xml fi - name: Test dart2js diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 0343409e75..5392f3504e 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -51,6 +51,15 @@ jobs: coverage: sentry min-coverage: 85 + - name: Upload test results to Codecov + if: ${{ !cancelled() && matrix.sdk == 'stable' }} + uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # pin@v1.1.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + name: dart-tests-${{ runner.os }}-${{ matrix.sdk }} + flags: dart-${{ matrix.os }} + verbose: true + - name: Build example working-directory: packages/dart/example run: | diff --git a/.github/workflows/logging.yml b/.github/workflows/logging.yml index 50a755c700..cb2e245fd1 100644 --- a/.github/workflows/logging.yml +++ b/.github/workflows/logging.yml @@ -45,6 +45,15 @@ jobs: coverage: sentry_logging min-coverage: 90 + - name: Upload test results to Codecov + if: ${{ !cancelled() && matrix.sdk == 'stable' }} + uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # pin@v1.1.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + name: logging-tests-${{ runner.os }}-${{ matrix.sdk }} + flags: logging-${{ matrix.os }} + verbose: true + analyze: uses: ./.github/workflows/analyze.yml with: