Update Java version for CI #60
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: macos-latest | |
env: | |
# Needed to get some information about the pull request, if any | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/ | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 28 | |
script: ./gradlew connectedCheck | |
- name: Upload Test Results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test output | |
path: /Users/runner/work/OpeningHoursFragment/OpeningHoursFragment/lib/build/reports/androidTests/connected/flavors/debugAndroidTest | |
- name: Generate coverage report | |
run: ./gradlew jacocoTestReport | |
- name: SonarCloud Scan | |
# only do this step if we have a token for sonar | |
if: ${{ env.SONAR_TOKEN }} | |
# note as we don't wait for processing to complete this will always succeed | |
run: ./gradlew sonarqube -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=simonpoole-github --info |