1name: 'Artifact Android local tests' 2description: 'Runs Android local tests on the Dagger LOCAL-SNAPSHOT artifacts.' 3 4inputs: 5 agp: 6 description: 'The version of AGP to test with.' 7 required: true 8 type: choice 9 options: 10 - '8.1.1' 11 jdk: 12 description: 'The version of JDK to test with.' 13 required: true 14 type: choice 15 options: 16 - '11' 17 - '17' 18 19runs: 20 using: "composite" 21 steps: 22 - name: 'Check out repository' 23 uses: actions/checkout@v4 24 - name: 'Cache Gradle files' 25 uses: actions/cache@v4 26 with: 27 path: | 28 ~/.gradle/caches 29 ~/.gradle/wrapper 30 key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} 31 restore-keys: | 32 ${{ runner.os }}-gradle- 33 - name: 'Download local snapshot for tests' 34 uses: actions/download-artifact@v4 35 with: 36 name: local-snapshot 37 path: ~/.m2/repository/com/google/dagger 38 - name: 'Install Java ${{ inputs.jdk }}' 39 uses: actions/setup-java@v4 40 with: 41 distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' 42 java-version: '${{ inputs.jdk }}' 43 - name: 'Gradle Android local tests (AGP ${{ inputs.agp }})' 44 run: ./util/run-local-gradle-android-tests.sh "${{ inputs.agp }}" 45 shell: bash 46 - name: 'Upload test reports (AGP ${{ inputs.agp }})' 47 if: ${{ always() }} 48 uses: actions/upload-artifact@v4 49 with: 50 name: tests-reports-agp-${{ inputs.agp }} 51 path: ${{ github.workspace }}/**/build/reports/tests/* 52