Skip to content

Commit

Permalink
feat[build]: git workflow add for setup
Browse files Browse the repository at this point in the history
  • Loading branch information
SaifulSaif007 committed Aug 9, 2024
1 parent 55e9a4c commit f270231
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 32 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/dev-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,31 @@ on:
- master

jobs:
setup_with_build:
uses: SaifulSaif007/Splash_Image_Gallery/.github/workflows/setup-workflow.yml@git-workflow

build_project:
needs: setup_with_build
setup_java:
runs-on: macos-latest

steps:
- name: checkout
uses: actions/checkout@v4

- name: setup JDK 19
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'corretto'
cache: 'gradle'
# cache-dependency-path: | # optional
# sub-project/*.gradle*
# sub-project/**/gradle-wrapper.properties

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew buildDebug --console=plain
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}

- name: Run Coverage
run:
./gradlew clean testDebugUnitTestCoverage
Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/setup-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Setup Workflow CI

on: workflow_call
jobs:
setup_java:
runs-on: macos-latest

steps:
- name: checkout
uses: actions/checkout@v4

- name: setup JDK 19
uses: actions/setup-java@v4
with:
java-version: '19'
distribution: 'corretto'
cache: 'gradle'
# cache-dependency-path: | # optional
# sub-project/*.gradle*
# sub-project/**/gradle-wrapper.properties

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew buildDebug --console=plain
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}
#on: workflow_call
#jobs:
# setup_java:
# runs-on: macos-latest
#
# steps:
# - name: checkout
# uses: actions/checkout@v4
#
# - name: setup JDK 19
# uses: actions/setup-java@v4
# with:
# java-version: '19'
# distribution: 'corretto'
# cache: 'gradle'
# # cache-dependency-path: | # optional
# # sub-project/*.gradle*
# # sub-project/**/gradle-wrapper.properties
#
# - name: Grant execute permission for gradlew
# run: chmod +x gradlew
#
# - name: Build with Gradle
# run: ./gradlew buildDebug --console=plain
# env:
# CLIENT_ID: ${{ secrets.CLIENT_ID }}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ android.defaults.buildfeatures.buildconfig=true
android.enableJetifier=false
android.nonFinalResIds=false
android.useAndroidX=true
clientID=""210rEZdu_UXkCL-ntrKQ9Ya0xsluAbLZAZSR0Y8TkJs"
clientID="210rEZdu_UXkCL-ntrKQ9Ya0xsluAbLZAZSR0Y8TkJs"
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"

0 comments on commit f270231

Please sign in to comment.