Skip to content

Commit

Permalink
[dev] --> updated github workflow dev-push.yml moved all tasks to one…
Browse files Browse the repository at this point in the history
… and added avd cache job to test if ci completes faster this way

[dev] --> updated dev-push.yml fixed syntax error.

[dev] --> update dev-push.yml

[dev] --> update README.md

[dev] --> update gradle.properties to trigger ci build

[dev] --> updated dev-pusl.yml
  • Loading branch information
syedahmedjamil committed Jan 21, 2024
1 parent 09135b6 commit 95f851b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 60 deletions.
84 changes: 26 additions & 58 deletions .github/workflows/dev-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ on:
- 'README.md'
branches: [ "dev" ]

workflow_dispatch:

jobs:
unit-test:
build-unit-integration-acceptance:
runs-on: macos-latest
steps:
- name: Checkout
Expand All @@ -19,6 +21,25 @@ jobs:
with:
cache-read-only: false

- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-29

- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: echo "Generated AVD snapshot for caching."

- name: Get Google Services Json
env:
CERTIFICATE_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON }}
Expand All @@ -33,25 +54,8 @@ jobs:
with:
name: unit-test-report
path: build/reports/unitTests

integration-test:
needs: [unit-test]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4


- name: Setup JDK And Gradle
uses: ./.github/actions/setup-jdk-gradle
with:
cache-read-only: false

- name: Get Google Services Json
env:
CERTIFICATE_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: |
echo $CERTIFICATE_BASE64 | base64 --decode > app/google-services.json
- name: Run Integration Test
uses: reactivecircus/android-emulator-runner@v2
with:
Expand All @@ -66,25 +70,7 @@ jobs:
with:
name: integration-test-report
path: build/androidTest-results

acceptance-test:
needs: [unit-test]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup JDK And Gradle
uses: ./.github/actions/setup-jdk-gradle
with:
cache-read-only: false

- name: Get Google Services Json
env:
CERTIFICATE_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: |
echo $CERTIFICATE_BASE64 | base64 --decode > app/google-services.json

- name: Run Acceptance Test
uses: reactivecircus/android-emulator-runner@v2
with:
Expand All @@ -98,31 +84,13 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: acceptance-test-report
path: build/androidTest-results
path: build/androidTest-results

assemble-debug:
needs: [unit-test, integration-test, acceptance-test]
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup JDK And Gradle
uses: ./.github/actions/setup-jdk-gradle
with:
cache-read-only: false

- name: Get Google Services Json
env:
CERTIFICATE_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: |
echo $CERTIFICATE_BASE64 | base64 --decode > app/google-services.json
- name: Assemble Debug Apk
run: ./gradlew assembleDebug

- name: Upload Debug Apk
uses: actions/upload-artifact@v3
with:
name: debug-apk
path: app/build/outputs/apk/debug/*.apk
path: app/build/outputs/apk/debug/*.apk
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Update
Updating app using clean architecture, acceptance test driven development and continuous integration/delivery using Github Actions and Firebase App Distribution. To see the old version, navigate to this [commit](https://github.com/syedahmedjamil/pushier/commit/ea7f30f8890fba63ff5571d64c3dffbe08dd9bfd) and click "Browse Files".
Updating app using clean architecture, acceptance test driven development and continuous integration/delivery using Github Actions and Firebase App Distribution. To see the old version, navigate to this [commit](https://github.com/syedahmedjamil/pushier/commit/ea7f30f8890fba63ff5571d64c3dffbe08dd9bfd) and click on "Browse Files".

# About
Android client app that integrates with pusher beams to show realtime in-app notifications.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Project-wide Gradle settings.
# Project-wide Gradle settings
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
Expand Down

0 comments on commit 95f851b

Please sign in to comment.