Skip to content

Commit

Permalink
[APT-10202] Prepare YML for CI
Browse files Browse the repository at this point in the history
thanks matt
  • Loading branch information
kabliz committed Jul 8, 2024
1 parent be7c40d commit c83c3d5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,32 +31,39 @@ jobs:
steps:
# Clone the repo
- name: Clone Repo
uses: actions/checkout@v2
uses: actions/checkout@v4

# Cache the gradle build dependencies for faster builds
- name: Cache Gradle Dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.GRADLE_CACHE_PATH }}
key: ${{ runner.os }}-${{ hashFiles('.gradle-cache-buster') }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/gradle.properties') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.gradle-cache-buster') }}-gradle-

# Download Java and set version
- name: Set Up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ vars.JDK_VERSION }}
distribution: 'temurin'

# Test using gradle
- name: Run ${{ matrix.project }} Tests
run: ./gradlew ${{ matrix.gradle-arguments }} --warning-mode all

# Upload the html test report as a build artifact for easier debugging
- name: Upload Test Report
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.test-group }} Test Reports
name: ${{ matrix.base-folder }} Test Reports
path: ${{ matrix.base-folder }}/build/reports/tests/${{ matrix.test-report-folder }}/*

# Upload XML logs as build artifacts (accessible from the Summary page of the run)
- name: Upload JUnit Logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.test-group }} Testing Logs
path: "${{ matrix.base-folder }}/build/test-results/test*UnitTest/TEST-*.xml"
Expand All @@ -82,16 +89,23 @@ jobs:
steps:
# Retrieve the repo
- name: Clone Repo
uses: actions/checkout@v2
uses: actions/checkout@v4

# Cache the gradle build dependencies for faster builds
- name: Cache Gradle Dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ${{ env.GRADLE_CACHE_PATH }}
key: ${{ runner.os }}-${{ hashFiles('.gradle-cache-buster') }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/gradle.properties') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.gradle-cache-buster') }}-gradle-

# Download Java and set version
- name: Set Up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ vars.JDK_VERSION }}
distribution: 'temurin'

# Build using gradle
- name: Build ${{ matrix.project }} Release
run: ./gradlew ${{ matrix.gradle-arguments }}
Expand All @@ -116,7 +130,7 @@ jobs:
# Upload the AAR file as a build artifact (accessible from the Summary page of the run)
- name: Upload AAR file
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.artifact-path }}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
apply from: "$project.rootDir/gradle/shared.gradle"

dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath "com.android.tools.build:gradle:$GRADLE_PLUGIN_VERSION"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ org.gradle.jvmargs=-Xmx1536m
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
PACKAGE_NAME=com.scribd.armadillo
GRADLE_PLUGIN_VERSION=7.2.0
LIBRARY_VERSION=1.3.3
EXOPLAYER_VERSION=2.17.1
RXJAVA_VERSION=2.2.4
Expand Down

0 comments on commit c83c3d5

Please sign in to comment.