-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove unit tests execution in snapshot tests job.
- Loading branch information
1 parent
89189e9
commit 3bb0adc
Showing
6 changed files
with
205 additions
and
155 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,60 @@ | ||
name: "Android Tests" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 55 | ||
strategy: | ||
matrix: | ||
api-level: [23, 33] | ||
|
||
steps: | ||
- name: Delete unnecessary tools 🔧 | ||
uses: jlumbroso/free-disk-space@v1.3.1 | ||
with: | ||
android: false | ||
tool-cache: true | ||
dotnet: true | ||
haskell: true | ||
swap-storage: true | ||
docker-images: false | ||
large-packages: false | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Enable KVM group perms | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Gradle cache | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build project before running emulator | ||
run: ./gradlew packageDemoDebug packageDemoDebugAndroidTest | ||
|
||
- name: Run Android tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: ${{ matrix.api-level }} | ||
arch: x86_64 | ||
disable-animations: true | ||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -grpc 8554 -grpc-use-jwt | ||
disk-size: 6000M | ||
heap-size: 600M | ||
script: ./gradlew connectedDemoDebugAndroidTest | ||
|
||
- name: Upload Android test reports | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: android-test-reports-${{ matrix.api-level }} | ||
path: '**/build/reports/androidTests' |
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,30 @@ | ||
name: "Build APK" | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: Check build-logic | ||
run: ./gradlew check -p build-logic | ||
|
||
- name: Build debug APK | ||
run: ./gradlew app:assembleDebug |
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,48 @@ | ||
name: "Coverage Report" | ||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- unit_tests | ||
- android_tests | ||
|
||
if: always() | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
# Adjust paths and commands as per your project's Jacoco configuration | ||
- name: Generate JaCoCo coverage report | ||
run: ./gradlew createDemoDebugJacocoReport | ||
|
||
- name: Display local test coverage | ||
id: jacoco | ||
uses: madrapps/jacoco-report@v1.6.1 | ||
with: | ||
title: Combined test coverage report | ||
min-coverage-overall: 40 | ||
min-coverage-changed-files: 60 | ||
paths: | | ||
${{ github.workspace }}/**/build/reports/jacoco/**/*Report.xml | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload coverage reports | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage-reports | ||
if-no-files-found: error | ||
compression-level: 1 | ||
overwrite: false | ||
path: '**/build/reports/jacoco/' | ||
|
||
- name: Upload test reports | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-reports | ||
path: '**/build/reports/androidTests' |
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,29 @@ | ||
name: "Snapshot tests" | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: Snapshot tests | ||
run: ./gradlew verifyPaparazziDemoDebug |
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,26 @@ | ||
name: "Unit Tests" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
|
||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: Run unit tests | ||
run: ./gradlew testDemoDebugUnitTest | ||
|
||
- name: Upload unit test reports | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: unit-test-reports | ||
path: '**/build/reports/tests' |