From e048f38811da5c2b9b176f3bc1a6ddb850435a5c Mon Sep 17 00:00:00 2001 From: Jakub Zerko Date: Thu, 27 Jun 2024 12:51:06 +0200 Subject: [PATCH] improvements --- .github/workflows/codestyle.yml | 2 + .../workflows/gradle-android-unit-tests.yml | 80 +++++++++---------- 2 files changed, 40 insertions(+), 42 deletions(-) diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index ef10b1c1b8e..e9cc44f5f70 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -6,6 +6,8 @@ jobs: static-code-analysis: runs-on: ubuntu-latest uses: ./.github/workflows/shared/setup-java-gradle.yml + with: + runs-on: ubuntu-latest steps: - name: Run Detekt run: | diff --git a/.github/workflows/gradle-android-unit-tests.yml b/.github/workflows/gradle-android-unit-tests.yml index d9945bcd54a..1e7f7f54c7b 100644 --- a/.github/workflows/gradle-android-unit-tests.yml +++ b/.github/workflows/gradle-android-unit-tests.yml @@ -17,53 +17,49 @@ jobs: runs-on: ubuntu-latest steps: - - uses: ./.github/workflows/shared/setup-java-gradle.yml - with: - runs-on: ubuntu-latest - - - name: Build the samples - env: - GITHUB_USER: ${{ github.actor }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - ./gradlew :samples:compileDebugSources + - name: Build the samples + env: + GITHUB_USER: ${{ github.actor }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + ./gradlew :samples:compileDebugSources - - name: Android Unit Tests - run: ./gradlew androidUnitOnlyAffectedTest - env: - GITHUB_USER: ${{ github.actor }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - 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@v4 - with: - name: test-reports - path: ./**/build/reports/tests/** + - name: Archive Test Reports + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-reports + path: ./**/build/reports/tests/** - - name: Archive Test Results - if: always() - uses: actions/upload-artifact@v4 - with: - name: test-results - path: | - ./**/build/test-results/testDebugUnitTest/**/*.xml - ./**/build/test-results/**/*.xml + - name: Archive Test Results + if: always() + uses: actions/upload-artifact@v4 + 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/composite@v2.11.0 - if: always() - with: - files: | - **/build/test-results/testDebugUnitTest/**/*.xml - **/build/test-results/**/*.xml + - name: Publish Unit Test Results + uses: EnricoMi/publish-unit-test-result-action/composite@v2.11.0 + 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 + - 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: runs-on: ubuntu-latest