39 lines
905 B
YAML
39 lines
905 B
YAML
name: Gitea Actions CI/CD Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
cache: 'gradle'
|
|
|
|
- name: Setup Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
with:
|
|
packages: 'platforms;android-34 build-tools;34.0.0'
|
|
accept-android-sdk-licenses: true
|
|
|
|
- name: Grant Execute Permission for Gradlew
|
|
run: chmod +x gradlew
|
|
|
|
- name: Run Unit Tests
|
|
run: ./gradlew test --no-daemon --stacktrace
|
|
|
|
- name: Build Debug APK
|
|
run: ./gradlew assembleDebug --no-daemon --stacktrace
|
|
|