Skip to content

Commit

Permalink
Tweak build workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong-tran committed Jan 8, 2025
1 parent 6e544a2 commit 06b5902
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/build_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.inputs.git-ref }}

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Get previous release
id: last_release
uses: InsonusK/get-latest-release@7a9ff16c8c6b7ead5d71c0f1cc61f2703170eade # v1.1.0
Expand Down Expand Up @@ -179,13 +176,24 @@ jobs:
# with:
# arguments: detekt assembleStandardPreview testStandardPreviewUnitTest testReleaseUnitTest

- name: Build standard app and run unit tests
- name: Check code format
run: ./gradlew spotlessCheck

- name: Build app
if: github.event.inputs.git-ref == 'master'
run: ./gradlew assembleStandardPreview -Pandroid.signingConfig=debug

- name: Run unit tests
if: github.event.inputs.git-ref == 'master'
run: ./gradlew assembleStandardPreview testStandardPreviewUnitTest testReleaseUnitTest -Pandroid.signingConfig=debug --stacktrace
run: ./gradlew testReleaseUnitTest testStandardPreviewUnitTest

- name: Build app
if: github.event.inputs.git-ref != 'master'
run: ./gradlew assembleDevPreview -Pandroid.signingConfig=debug

- name: Build dev app and run unit tests
- name: Run unit tests
if: github.event.inputs.git-ref != 'master'
run: ./gradlew assembleDevPreview testDevPreviewUnitTest testReleaseUnitTest -Pandroid.signingConfig=debug --stacktrace
run: ./gradlew testReleaseUnitTest testDevPreviewUnitTest

- name: Upload artifacts
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:
repository: 'komikku-app/komikku'
ref: 'master'

- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Dependency Review
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

Expand Down Expand Up @@ -56,5 +53,11 @@ jobs:
- name: Set up gradle
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4

- name: Build app and run unit tests
run: ./gradlew assembleStandardPreview testStandardPreviewUnitTest testReleaseUnitTest --stacktrace
- name: Check code format
run: ./gradlew spotlessCheck

- name: Build app
run: ./gradlew assembleStandardPreview

- name: Run unit tests
run: ./gradlew testReleaseUnitTest testStandardPreviewUnitTest

0 comments on commit 06b5902

Please sign in to comment.