This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
Android CI #379
Workflow file for this run
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
name: Android CI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
paths: | |
- .github/workflows/android_workflow.yaml | |
- newsfeed_android/** | |
# Declare default permissions as read only. | |
permissions: read-all | |
defaults: | |
run: | |
working-directory: ./newsfeed_android | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.platform }} | |
name: build / ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 | |
with: | |
channel: "stable" | |
- run: flutter --version | |
- name: Build Flutter AAR file | |
working-directory: flutter_nps | |
run: flutter build aar | |
- name: Set up JDK | |
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 | |
with: | |
distribution: "zulu" | |
java-version: "17" | |
- name: Change wrapper permissions | |
working-directory: ./newsfeed_android | |
run: chmod +x ./gradlew | |
- name: Android linter | |
run: ./gradlew lint | |
continue-on-error: false | |
- name: Run Checkstyle | |
uses: dbelyaev/action-checkstyle@ee2055a5f301a522c38c51ef80a5ff547fea39c8 | |
if: matrix.platform == 'ubuntu-latest' | |
with: | |
github_token: ${{ secrets.github_token }} | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Run Android Unit Test | |
run: ./gradlew testDebugUnitTest | |
- name: Run Android Instrumented tests | |
if: matrix.platform == 'macos-latest' | |
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b | |
with: | |
working-directory: ./newsfeed_android | |
api-level: 29 | |
script: ./gradlew connectedCheck |