From b857d18ac8530c6c6a4d2b999d4e1de95fc7097b Mon Sep 17 00:00:00 2001 From: Hasan Abdullah Date: Thu, 24 Sep 2020 16:18:51 +0600 Subject: [PATCH 1/3] Create blank.yml --- .github/workflows/blank.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000..89c3fba --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,37 @@ +# This is a basic workflow to help you get started with Actions + +name: Android Unit Test Branch CI + +# 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 ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Setup JDK 1.8 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + # Give permission to execute gradle + - name: Make gradlew executable + run: chmod +x ./gradlew + + # Run unit test + - name: Unit tests + run: bash ./gradlew test --stacktrace From 0b16b0a080ec30da44148e6d7e073a93f67152fb Mon Sep 17 00:00:00 2001 From: Hasan Abdullah Date: Thu, 24 Sep 2020 16:29:17 +0600 Subject: [PATCH 2/3] Update ExampleUnitTest.kt --- .../com/hellohasan/sharedpreferencesdagger/ExampleUnitTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/test/java/com/hellohasan/sharedpreferencesdagger/ExampleUnitTest.kt b/app/src/test/java/com/hellohasan/sharedpreferencesdagger/ExampleUnitTest.kt index 93b814d..a901d4d 100644 --- a/app/src/test/java/com/hellohasan/sharedpreferencesdagger/ExampleUnitTest.kt +++ b/app/src/test/java/com/hellohasan/sharedpreferencesdagger/ExampleUnitTest.kt @@ -12,6 +12,6 @@ import org.junit.Assert.* class ExampleUnitTest { @Test fun addition_isCorrect() { - assertEquals(4, 2 + 2) + assertEquals(4, 2 + 3) } -} \ No newline at end of file +} From 5dacabc2a8e60b5fe5b10b0da0304083d3d94ba4 Mon Sep 17 00:00:00 2001 From: Hasan Abdullah Date: Thu, 24 Sep 2020 16:41:19 +0600 Subject: [PATCH 3/3] Update ExampleUnitTest.kt --- .../com/hellohasan/sharedpreferencesdagger/ExampleUnitTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/test/java/com/hellohasan/sharedpreferencesdagger/ExampleUnitTest.kt b/app/src/test/java/com/hellohasan/sharedpreferencesdagger/ExampleUnitTest.kt index a901d4d..d9cbbbe 100644 --- a/app/src/test/java/com/hellohasan/sharedpreferencesdagger/ExampleUnitTest.kt +++ b/app/src/test/java/com/hellohasan/sharedpreferencesdagger/ExampleUnitTest.kt @@ -12,6 +12,6 @@ import org.junit.Assert.* class ExampleUnitTest { @Test fun addition_isCorrect() { - assertEquals(4, 2 + 3) + assertEquals(4, 2 + 2) } }