-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Run Unit Tests | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the "main" branch | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Cache Gradle dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: > | ||
${{ runner.os }}-gradle- | ||
${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
# It finds the cache by key "Linux-gradle-" | ||
restore-keys: ${{ runner.os }}-gradle- | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'zulu' | ||
cache: gradle | ||
|
||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x ./gradlew | ||
|
||
- name: Update dependencies | ||
run: ./gradlew dependencies | ||
|
||
# Run tests and merge all reports into a single one. | ||
# It requires to add a plugin to project level build.gradle: apply(plugin = "android-reporting") | ||
- name: Run Unit tests | ||
run: ./gradlew test | ||
|
||
# Optional: Run instrumented tests (Requires Android Emulator) | ||
# - name: Run Instrumented Tests | ||
# run: ./gradlew connectedAndroidTest | ||
|
||
# - name: Upload Test Report | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: Test-Reports | ||
# path: feature/glow_editor/build/reports/tests/testProductionDebugUnitTest | ||
|
||
# - name: Deploy Test Reports to GitHub Pages | ||
# uses: peaceiris/actions-gh-pages@v3 | ||
# with: | ||
# github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# publish_dir: ./feature/glow_editor/build/reports/tests/testProductionDebugUnitTest # Adjust this to the path where your HTML reports are generated | ||
# publish_branch: gh-pages | ||
|
||
- name: Build status = ${{ job.status }} | ||
run: echo "Build status report=${{ job.status }}." |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Built application files | ||
*.apk | ||
*.aar | ||
*.ap_ | ||
*.aab | ||
|
||
# Files for the ART/Dalvik VM | ||
*.dex | ||
|
||
# Java class files | ||
*.class | ||
|
||
# Generated files | ||
bin/ | ||
gen/ | ||
out/ | ||
# Uncomment the following line in case you need and you don't have the release build type files in your app | ||
# release/ | ||
|
||
# Gradle files | ||
.gradle/ | ||
build/ | ||
|
||
# Local configuration file (sdk path, etc) | ||
local.properties | ||
keystore.properties | ||
|
||
# Proguard folder generated by Eclipse | ||
proguard/ | ||
|
||
# Log Files | ||
*.log | ||
|
||
# Android Studio Navigation editor temp files | ||
.navigation/ | ||
|
||
# Android Studio captures folder | ||
captures/ | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea/workspace.xml | ||
.idea/tasks.xml | ||
.idea/gradle.xml | ||
.idea/assetWizardSettings.xml | ||
.idea/dictionaries | ||
.idea/libraries | ||
.idea/deploymentTargetDropDown.xml | ||
# Android Studio 3 in .gitignore file. | ||
.idea/caches | ||
.idea/modules.xml | ||
# Comment next line if keeping position of elements in Navigation Editor is relevant for you | ||
.idea/navEditor.xml | ||
.idea/appInsightsSettings.xml | ||
.idea/androidTestResultsUserPreferences.xml | ||
|
||
|
||
# Keystore files | ||
# Uncomment the following lines if you do not want to check your keystore files in. | ||
*.jks | ||
*.keystore | ||
*.asc | ||
!gradle-wrapper.properties | ||
!gradle.properties | ||
|
||
# External native build folder generated in Android Studio 2.2 and later | ||
.externalNativeBuild | ||
.cxx/ | ||
|
||
# Google Services (e.g. APIs or Firebase) | ||
# google-services.json | ||
|
||
# Freeline | ||
freeline.py | ||
freeline/ | ||
freeline_project_description.json | ||
|
||
# fastlane | ||
fastlane/report.xml | ||
fastlane/Preview.html | ||
fastlane/screenshots | ||
fastlane/test_output | ||
fastlane/readme.md | ||
|
||
# Version control | ||
vcs.xml | ||
|
||
# lint | ||
lint/intermediates/ | ||
lint/generated/ | ||
lint/outputs/ | ||
lint/tmp/ | ||
# lint/reports/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.