Merge pull request #22 from piashcse/fixing-fav-ui-updates #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI/CD | |
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
branches: | |
- master | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '17' # Change to the version you need for your project | |
- name: Cache Gradle files | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
gradle-${{ runner.os }} | |
- name: Build and test | |
run: ./gradlew build --no-daemon | |
- name: Run unit tests | |
run: ./gradlew test --no-daemon | |
# Upload debug APK as an artifact | |
- name: Build debug APK | |
run: ./gradlew assembleDebug --no-daemon | |
- name: Upload APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: movie-world-apk | |
path: app/build/outputs/apk/develop/debug/app-develop-debug.apk # Path to your APK |