Skip to content

Merge pull request #61 from LeoAndo/LeoAndo-patch-2 #193

Merge pull request #61 from LeoAndo/LeoAndo-patch-2

Merge pull request #61 from LeoAndo/LeoAndo-patch-2 #193

Workflow file for this run

name: Android CI
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
# https://github.com/styfle/cancel-workflow-action#usage
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Create local.properties
env:
MAPS_API_KEY: ${{ secrets.MAPS_API_KEY }}
run: |
echo "MAPS_API_KEY=$MAPS_API_KEY" >> local.properties
# gradle cache
- uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run lint for lint the variants.
run: ./gradlew lint
#- name: Run unit tests for testDebugUnitTest the variants.
# run: ./gradlew testDebugUnitTest
- name: Build tasks (Assemble main outputs for assembleDebug the variants.)
run: |
./gradlew assembleDebug
# https://github.com/android/nowinandroid/blob/main/.github/workflows/Build.yaml
- name: Upload build outputs (APKs)
uses: actions/upload-artifact@v3
with:
name: build-outputs
path: app/build/outputs
- name: Upload build reports
if: always()
uses: actions/upload-artifact@v3
with:
name: build-reports
path: app/build/reports