Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading the repo dependencies and tooling to current android standards #213

Merged
merged 9 commits into from
Feb 20, 2024
Prev Previous commit
Next Next commit
Create android.yml
Creating a new workflow with jdk 17 and updating maven publish command
  • Loading branch information
lalwani authored Feb 20, 2024
commit 897c8324130efef45f35c7e799dbfa1abb4e4e8f
81 changes: 81 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on: [push, pull_request]

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Install JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Lint and Unit tests
run: ./gradlew check --stacktrace
- name: Upload lint and test reports
if: always()
uses: actions/upload-artifact@v2
with:
name: execution-reports
path: |
./core-android/build/reports
./rides-android/build/reports

test:
runs-on: macOS-latest # enables hardware acceleration in the virtual machine, required for emulator testing
strategy:
matrix:
api-level: [ 21, 23, 26 ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Install JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Emulator tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: google_apis
arch: x86
disable-animations: true
script: ./gradlew connectedCheck --stacktrace
- name: Upload instrumented test reports
if: always()
uses: actions/upload-artifact@v2
with:
name: test-reports
path: |
./core-android/build/reports
./rides-android/build/reports

upload-snapshots:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs:
- check
- test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Install JDK
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '17'
- name: Upload snapshots
run: ./gradlew publish --stacktrace
env:
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SonatypeUsername }}
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.SonatypePassword }}
Loading