Skip to content

Merge pull request #8 from LeoAndo/LeoAndo-patch-1 #22

Merge pull request #8 from LeoAndo/LeoAndo-patch-1

Merge pull request #8 from LeoAndo/LeoAndo-patch-1 #22

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/cancel-workflow-action@0.11.0
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
# 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