Skip to content

Commit

Permalink
#9: adding github action for instrumented tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arburk committed Jan 1, 2024
1 parent 21979ff commit 35415ad
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
run: ./gradlew sonar

- name: Upload test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Reports
path: ${{ github.workspace }}/app/build/reports/
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/android_it.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Android Instrumented Tests

on:
pull_request:
types:
- opened
- reopened
- edited
push:
branches:
- 'main'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew clean build supportedSdksGroupDebugAndroidTest jacocoTestReport

- name: Sonar checks
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: Reports
path: ${{ github.workspace }}/app/build/reports/
retention-days: 14

0 comments on commit 35415ad

Please sign in to comment.