name: 'Artifact Android local tests' description: 'Runs Android local tests on the Dagger LOCAL-SNAPSHOT artifacts.' inputs: agp: description: 'The version of AGP to test with.' required: true type: choice options: - '8.1.1' jdk: description: 'The version of JDK to test with.' required: true type: choice options: - '11' - '17' runs: using: "composite" steps: - name: 'Check out repository' uses: actions/checkout@v4 - name: 'Cache Gradle files' uses: actions/cache@v4 with: path: | ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- - name: 'Download local snapshot for tests' uses: actions/download-artifact@v4 with: name: local-snapshot path: ~/.m2/repository/com/google/dagger - name: 'Install Java ${{ inputs.jdk }}' uses: actions/setup-java@v4 with: distribution: '${{ env.USE_JAVA_DISTRIBUTION }}' java-version: '${{ inputs.jdk }}' - name: 'Gradle Android local tests (AGP ${{ inputs.agp }})' run: ./util/run-local-gradle-android-tests.sh "${{ inputs.agp }}" shell: bash - name: 'Upload test reports (AGP ${{ inputs.agp }})' if: ${{ always() }} uses: actions/upload-artifact@v4 with: name: tests-reports-agp-${{ inputs.agp }} path: ${{ github.workspace }}/**/build/reports/tests/*