Merge pull request #1883 from embrace-io/move-test-common #8227
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| release: | |
| types: [ released ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| gradle-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout Branch | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'adopt' | |
| java-version: 17 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.m2/repository/org/robolectric | |
| key: robolectric-${{ hashFiles('.github/fetch-robolectric-dependencies.sh') }} | |
| restore-keys: | | |
| robolectric- | |
| - name: Fetch Robolectric dependencies | |
| run: /bin/sh .github/fetch-robolectric-dependencies.sh | |
| # 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: test-results | |
| path: '**/build/reports/tests/**' | |
| - name: Run Kover Code Coverage | |
| run: ./gradlew koverXmlReportRelease | |
| - uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| files: embrace-android-sdk/build/reports/kover/reportRelease.xml |