-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,674 changed files
with
61,157 additions
and
33,271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
name: Android CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
concurrency: | ||
group: android-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Set up Android SDK License | ||
run: yes | /usr/local/lib/android/sdk/tools/bin/sdkmanager --licenses | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew :android:spotlessCheck :android:lint :android:build | ||
|
||
- name: Upload build reports | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build-reports | ||
path: '**/build/reports' | ||
|
||
- name: Upload build mapping | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build-mapping | ||
path: ./android/build/outputs/mapping | ||
|
||
unit-test: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Set up Android SDK License | ||
run: yes | /usr/local/lib/android/sdk/tools/bin/sdkmanager --licenses | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew :android:test | ||
|
||
- name: Upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: unit-test-result | ||
path: "**/build/test-results/**/*.xml" | ||
|
||
connected-test: | ||
runs-on: macOS-11 | ||
needs: build | ||
timeout-minutes: 60 | ||
|
||
strategy: | ||
# Allow tests to continue on other devices if they fail on one device. | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- api-level: 30 | ||
target: google_apis | ||
- api-level: 28 | ||
target: default | ||
- api-level: 26 | ||
target: default | ||
- api-level: 24 | ||
target: default | ||
- api-level: 22 | ||
target: default | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: set up JDK | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Set up Android SDK License | ||
run: (while sleep 3; do echo "y"; done) | /Users/runner/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager --licenses | ||
|
||
- name: Build tests | ||
run: ./gradlew :android:assembleAndroidTest | ||
|
||
- name: Run tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
timeout-minutes: 40 | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
profile: 4in WVGA (Nexus S) | ||
ram-size: 2048M | ||
target: ${{ matrix.target }} | ||
script: | | ||
adb logcat > logcat.txt & | ||
./gradlew :android:connectedCheck | ||
- name: Upload logs | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: logs-${{ matrix.api-level }}-${{ matrix.target }} | ||
path: logcat.txt | ||
|
||
- name: Upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: test-results-${{ matrix.api-level }}-${{ matrix.target }} | ||
path: "**/build/outputs/**/connected/**/*.xml" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.