Skip to content

feat:Refactor CI/CD workflows and enhance testing coverage #5

feat:Refactor CI/CD workflows and enhance testing coverage

feat:Refactor CI/CD workflows and enhance testing coverage #5

Workflow file for this run

name: Build APK
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev, feature/* ]
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run unit tests
run: ./gradlew test --continue
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ github.run_number }}
path: |
app/build/reports/tests/
app/build/test-results/
app/build/reports/androidTests/
retention-days: 7
- name: Build debug APK
run: ./gradlew assembleDebug
- name: Upload debug APK
uses: actions/upload-artifact@v4
with:
name: debug-apk
path: app/build/outputs/apk/debug/*.apk
retention-days: 7