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 0ac4a39
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 46 deletions.
48 changes: 31 additions & 17 deletions .github/workflows/dev-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,41 @@ on:
- master

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

build_project:
needs: setup_with_build
build_app:
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: Run Coverage
run:
./gradlew clean testDebugUnitTestCoverage
- name: Build with Gradle
run: ./gradlew buildDebug --console=plain
env:
CLIENT_ID: ${{ secrets.CLIENT_ID }}

- name: Add coverage to PR only
if: github.event_name == 'pull_request'
id: jacoco
uses: madrapps/jacoco-report@v1.3
with:
paths: ${{ github.workspace }}/build/reports/jacoco/testDebugUnitTestCoverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
# - name: Run Coverage
# run:
# ./gradlew clean testDebugUnitTestCoverage
#
# - name: Add coverage to PR only
# if: github.event_name == 'pull_request'
# id: jacoco
# uses: madrapps/jacoco-report@v1.3
# with:
# paths: ${{ github.workspace }}/build/reports/jacoco/testDebugUnitTestCoverage.xml
# token: ${{ secrets.GITHUB_TOKEN }}
# min-coverage-overall: 80
# min-coverage-changed-files: 80
28 changes: 0 additions & 28 deletions .github/workflows/setup-workflow.yml

This file was deleted.

Empty file.
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 0ac4a39

Please sign in to comment.