Update all dependencies (#2464) #7303
This file contains 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: Build & test | |
on: | |
push: | |
branches: | |
- main | |
- release-0.1.x | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
# Skip build if head commit contains 'skip ci' | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
lfs: 'true' | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Unit Tests | |
uses: gradle/gradle-build-action@v3 | |
with: | |
arguments: testDebug -Dtest.excludeCategories=com.google.android.horologist.screenshots.rng.ScreenshotTest | |
- name: test-results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-results | |
path: | | |
**/build/test-results/* | |
**/build/reports/* | |
**/out/* | |
screenshot1: | |
# Skip build if head commit contains 'skip ci' | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
lfs: 'true' | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Unit Tests | |
uses: gradle/gradle-build-action@v3 | |
id: screenshotsverify | |
with: | |
arguments: --no-daemon verifyRoborazziDebug -x composables:verifyRoborazziDebug -x sample:verifyRoborazziDebug | |
- name: screenshot-test-results-1 | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: screenshot-results-1 | |
path: | | |
**/build/test-results/* | |
**/build/reports/* | |
**/build/outputs/roborazzi/* | |
**/out/* | |
screenshot2: | |
# Skip build if head commit contains 'skip ci' | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
lfs: 'true' | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Unit Tests 2 | |
uses: gradle/gradle-build-action@v3 | |
id: screenshotsverify2 | |
with: | |
arguments: --no-daemon composables:verifyRoborazziDebug sample:verifyRoborazziDebug | |
- name: screenshot-test-results-2 | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: screenshot-results-2 | |
path: | | |
**/build/test-results/* | |
**/build/reports/* | |
**/build/outputs/roborazzi/* | |
**/out/* | |
compiletests: | |
# Skip build if head commit contains 'skip ci' | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
timeout-minutes: 50 | |
env: | |
TERM: dumb | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
lfs: 'true' | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Compile tests | |
uses: gradle/gradle-build-action@v3 | |
with: | |
arguments: -Pstrict.build=true compileDebugAndroidTestSources | |
verify: | |
# Skip build if head commit contains 'skip ci' | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
lfs: 'true' | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Check GIT lfs images | |
run: | | |
./scripts/git-lfs-check.sh | |
- name: Metalava compatibility check | |
uses: gradle/gradle-build-action@v3 | |
with: | |
arguments: --stacktrace | |
metalavaCheckCompatibility metalavaCheckCompatibilityRelease | |
- name: Code analysis | |
uses: gradle/gradle-build-action@v3 | |
with: | |
arguments: --stacktrace | |
spotlessCheck | |
lintDebug | |
- name: Dependencies analysis | |
uses: gradle/gradle-build-action@v3 | |
if: ${{ false }} # Disabled until -android supported https://github.com/google/horologist/issues/1314 | |
with: | |
arguments: --stacktrace | |
projectHealth |