chore(deps): [WPB-9777] bump peaceiris/actions-gh-pages from 329bcc8f12caed2cefe5a5b80781499a6f3b361b to 84c30a85c19949d7eee79c4ff27748b70285e453 #9124
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Android Unit Tests" | |
| on: | |
| merge_group: | |
| pull_request: | |
| types: [ opened, synchronize ] # Don't rerun on `edited` to save time | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_sha }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read # required for actions/checkout and repository metadata reads | |
| jobs: | |
| detekt: | |
| name: Detekt | |
| uses: ./.github/workflows/codestyle.yml | |
| gradle-run-tests: | |
| name: Gradle Run Tests | |
| needs: [ detekt ] | |
| permissions: | |
| contents: read # required to read repository metadata in private repositories | |
| issues: read # required to find related pull requests in private repositories | |
| checks: write # required to publish unit test check runs | |
| pull-requests: write # required to publish pull request comments | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Java and Gradle | |
| uses: ./.github/actions/setup-java-gradle | |
| with: | |
| enable-kvm: true | |
| - name: Build the samples | |
| env: | |
| GITHUB_USER: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./gradlew :sample:samples:compileAndroidHostTestSources | |
| - name: Android Unit Tests | |
| run: ./gradlew androidUnitOnlyAffectedTest | |
| env: | |
| GITHUB_USER: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Archive Test Reports | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: test-reports | |
| path: ./**/build/reports/tests/** | |
| - name: Archive Test Results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: test-results | |
| path: | | |
| ./**/build/test-results/testDebugUnitTest/**/*.xml | |
| ./**/build/test-results/**/*.xml | |
| - name: Publish Unit Test Results | |
| uses: EnricoMi/publish-unit-test-result-action/linux@2ceeed2b8f26e15b06c3846719f75354febd9e7b | |
| if: ${{ always() }} | |
| with: | |
| files: | | |
| **/build/test-results/testDebugUnitTest/**/*.xml | |
| **/build/test-results/**/*.xml | |
| - name: Cleanup Gradle Cache | |
| # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. | |
| # Restoring these files from a GitHub Actions cache might cause problems for future builds. | |
| run: | | |
| rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
| rm -f ~/.gradle/caches/modules-2/gc.properties | |
| upload-test-results-datadadog: | |
| name: Upload Test Results Datadadog | |
| runs-on: ubuntu-latest | |
| needs: gradle-run-tests | |
| if: always() | |
| steps: | |
| - name: Download tests results | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c | |
| continue-on-error: true | |
| with: | |
| name: test-results | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e | |
| with: | |
| node-version: 18 | |
| - name: Install datadog-ci | |
| run: npm install -g @datadog/datadog-ci | |
| - name: "Upload results" | |
| env: | |
| DATADOG_API_KEY: ${{ secrets.DD_API_KEY }} | |
| DD_ENV: ci | |
| DATADOG_SITE: datadoghq.eu | |
| run: | | |
| find . -name "*.xml" -type f | sed 's/ /\\ /g' | tr '\n' ' ' | xargs -L 1 datadog-ci junit upload --service kalium-android-unit . |