Skip to content

Commit

Permalink
Update android build workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Feb 2, 2024
1 parent 3bd2f41 commit 485c074
Showing 1 changed file with 43 additions and 32 deletions.
75 changes: 43 additions & 32 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,68 @@ on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
branches: [ '*' ]

jobs:
lint:
name: Spotless check
runs-on: ubuntu-18.04
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4.1.1
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4.0.0
with:
java-version: 11
distribution: 'zulu'
java-version: 17
- name: spotless
run: ./gradlew spotlessCheck

api_check:
name: API check
runs-on: ubuntu-18.04
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4.1.1
- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v4.0.0
with:
java-version: 11
distribution: 'zulu'
java-version: 17
- name: API check
run: ./gradlew apiCheck

build:
runs-on: ubuntu-latest
name: Build and Tests
runs-on: macos-latest
steps:
- uses: actions/checkout@v2

- name: set up JDK
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache Gradle and wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make Gradle executable
run: chmod +x ./gradlew

- name: Build with Gradle
run: ./gradlew build
- uses: actions/checkout@v4.1.1

- name: set up JDK
uses: actions/setup-java@v4.0.0
with:
distribution: 'zulu'
java-version: 17

- name: Cache Gradle and wrapper
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make Gradle executable
run: chmod +x ./gradlew

- name: Build with Gradle
run: |
./gradlew --scan --stacktrace \
assemble
- name: Run unit tests
run: |
./gradlew --scan --stacktrace \
testDebugUnitTest

0 comments on commit 485c074

Please sign in to comment.