aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorBrad Corso <bcorso@google.com>2021-03-17 14:44:46 -0700
committerDagger Team <dagger-dev+copybara@google.com>2021-03-17 14:46:44 -0700
commit66356c0a9d6ca58d9ad731ea54ddb4d593e3f2a9 (patch)
tree80c17e5fbaf24d0e74706fbd956818903baa5b34 /.github
parent57255db62d0ee30d00ff8bba9a0176c312fcfaa3 (diff)
downloaddagger2-66356c0a9d6ca58d9ad731ea54ddb4d593e3f2a9.tar.gz
Add more logging of test results when running gradle tests.
This CL adds logging that should make it easier to see which tests have run and view the test results. Example Action run: https://github.com/google/dagger/actions/runs/603847514 * Uploads test / androidTest build reports as downloadable artifacts * Adds individual test results in console using tasks.withType(Test) * Adds individual androidTest results in console using LogCat * Adds --keep_going (Bazel) and --continue (Gradle) to make iterating on multiple test failures faster. RELNOTES=N/A PiperOrigin-RevId: 363511840
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml20
1 files changed, 19 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6ff809dce..6c818cc98 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -70,7 +70,7 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: 'Run Bazel tests'
- run: bazel test --test_output=errors //...
+ run: bazel test --test_output=errors //... --keep_going
shell: bash
- name: 'Install local snapshot'
run: ./util/install-local-snapshot.sh
@@ -131,6 +131,12 @@ jobs:
- name: 'Gradle Android local tests (AGP ${{ matrix.agp }})'
run: ./util/run-local-gradle-android-tests.sh "${{ matrix.agp }}"
shell: bash
+ - name: 'Upload test reports (AGP ${{ matrix.agp }})'
+ if: ${{ always() }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: tests-reports-agp-${{ matrix.agp }}
+ path: ${{ github.workspace }}/**/build/reports/tests/*
artifact-android-emulator-tests:
name: 'Artifact Android emulator tests (API 30)'
needs: bazel-test
@@ -161,6 +167,12 @@ jobs:
api-level: 30
target: google_apis
script: ./util/run-local-emulator-tests.sh
+ - name: 'Upload test reports (API 30)'
+ if: ${{ always() }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: androidTests-reports-api-30
+ path: ${{ github.workspace }}/**/build/reports/androidTests/connected/*
publish-snapshot:
name: 'Publish snapshot'
# TODO(bcorso): Consider also waiting on artifact-android-emulator-tests
@@ -247,3 +259,9 @@ jobs:
api-level: ${{ matrix.api-level }}
target: google_apis
script: ./util/run-local-emulator-tests.sh
+ - name: 'Upload test reports (API ${{ matrix.api-level }})'
+ if: ${{ always() }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: androidTests-report-api-${{ matrix.api-level }}
+ path: ${{ github.workspace }}/**/build/reports/androidTests/connected/*