diff --git a/.github/workflows/PR-workflow.yml b/.github/workflows/PR-workflow.yml index 6f3d9fa5..07a23e12 100644 --- a/.github/workflows/PR-workflow.yml +++ b/.github/workflows/PR-workflow.yml @@ -7,23 +7,36 @@ on: jobs: build: runs-on: macos-latest - strategy: - matrix: - flavor: [Aosp, Google] + steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Set up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' - cache: gradle + + - name: Cache gradle + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Check detekt run: ./gradlew detekt + - name: Check lint run: ./gradlew lint - - name: Run tests on ${{ matrix.flavor }} flavour - run: ./gradlew test${{ matrix.flavor }}DebugUnitTest - - name: Assemble ${{ matrix.flavor }} debug build - run: ./gradlew assemble${{ matrix.flavor }}Debug + + - name: Run tests on AOSP flavour + run: ./gradlew testAospDebugUnitTest + + - name: Compile AOSP debug build to verify no-compilation errors + run: ./gradlew compileAospDebugKotlin + + - name: Compile Google debug build to verify no-compilation errors + run: ./gradlew compileGoogleDebugKotlin \ No newline at end of file diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index 13243a08..799fb0b1 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -22,7 +22,14 @@ jobs: with: java-version: '17' distribution: 'temurin' - cache: 'gradle' + + - name: Cache gradle + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- - name: Unpack secrets run: |