Skip to content

6.8.2

6.8.2 #4738

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches:
release:
types: [ released ]
jobs:
gradle-test:
runs-on: macos-14
timeout-minutes: 30
strategy:
matrix:
jdk-version: ["17"]
steps:
- name: Checkout Branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
~/.m2/repository
~/.sonar/cache
key: ${{ runner.os }}-gradle-jdk${{ matrix.jdk-version }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle
- name: Install JDK ${{ matrix.jdk-version }}
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.jdk-version }}
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2
# Build the entire project, run the tests, and run all static analysis
- name: Gradle Build
run: ./gradlew assembleRelease check --stacktrace
- name: Archive Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: android-sdk-test-results
path: embrace-android-sdk/build/reports/tests/
- name: Run Kover Code Coverage
run: ./gradlew clean koverXmlReportRelease
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
file: embrace-android-sdk/build/reports/kover/reportRelease.xml
- name: Cleanup Gradle Cache
# Based on https://docs.github.com/en/actions/guides/building-and-testing-java-with-gradle#caching-dependencies
# 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