Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/fake-google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"project_info": {
"project_number": "1092521184945",
"firebase_url": "https://dev-personal-XXX.firebaseio.com",
"project_id": "dev-personal-XXX",
"storage_bucket": "dev-personal-XXX.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1092521184945:android:af137629aab59de5af1c90",
"android_client_info": {
"package_name": "to.dev.dev_android.debug"
}
},
"oauth_client": [
{
"client_id": "XX.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "XXX"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "XXX.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
31 changes: 31 additions & 0 deletions .github/workflows/runOnGitHub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# .github/workflows/runOnGitHub.yml
# GitHub Actions documentation
# => https://docs.github.com/en/actions
name: runOnGitHub

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Copy fake google-services.json
run: cp -f .github/fake-google-services.json app/google-services.json
- uses: actions/setup-java@v1
with:
java-version: 8

# Execute Gradle commands in GitHub Actions workflows
# => https://github.com/marketplace/actions/gradle-command
- uses: eskatos/gradle-command-action@v1
with:
arguments: runOnGitHub
wrapper-cache-enabled: true
dependencies-cache-enabled: true
configuration-cache-enabled: true
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ import org.junit.Assert.*

class MainActivityTest {

@Test
fun `2 plus 2 equals 4`() {
assertEquals(2+2, 4)
}

@Test
fun onCreate() {


}

@Test
Expand Down
7 changes: 7 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,10 @@ detekt {
tasks.named<Wrapper>("wrapper") {
distributionType = Wrapper.DistributionType.ALL
}

tasks.register("runOnGitHub") {
// Documentation: https://guides.gradle.org/writing-gradle-tasks/
dependsOn(":app:testDebugUnitTest")
group = "custom"
description = "$ ./gradlew runOnGitHub # runs on GitHub Action"
}
12 changes: 12 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
plugins {
id("com.gradle.enterprise").version("3.1.1")
}

gradleEnterprise {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
publishOnFailure()
}
}

include(":app")