From 081117bca1be713ed6f15ad0753070d9a9cd296a Mon Sep 17 00:00:00 2001 From: Muzahidul Islam Date: Mon, 27 Jan 2025 22:28:16 +0600 Subject: [PATCH 1/5] Remove travis from doc --- .github/workflows/android.yml | 16 +++++++++++++++- README.md | 1 - build.gradle | 5 ----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 5690f0ff..98ba6c4d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -135,7 +135,21 @@ jobs: force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true - script: ./gradlew testAllModulesTravis + script: ./gradlew task testAllModules () { + logger.info("Running android tests for all modules") + dependsOn('testAllModules', ':test-app:connectedAndroidTest') +} + + task testAllModules () { + logger.info("Running android tests for Travis") + dependsOn(':android-sdk:connectedAndroidTest', ':android-sdk:test', + ':event-handler:connectedAndroidTest', ':event-handler:test', + ':datafile-handler:connectedAndroidTest', ':datafile-handler:test', + ':user-profile:connectedAndroidTest', + ':shared:connectedAndroidTest', + ':odp:connectedAndroidTest', ':odp:test' + ) +} publish: if: startsWith(github.ref, 'refs/tags/') uses: optimizely/android-sdk/.github/workflows/build.yml@master diff --git a/README.md b/README.md index 3258842e..e60356ff 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ # Optimizely Android SDK [![Apache 2.0](https://img.shields.io/github/license/nebula-plugins/gradle-extra-configurations-plugin.svg)](http://www.apache.org/licenses/LICENSE-2.0) -[![Build Status](https://travis-ci.org/optimizely/android-sdk.svg?branch=master)](https://travis-ci.org/optimizely/android-sdk) This repository houses the Android SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy). The Android SDK depends on the [Optimizely Java SDK](https://github.com/optimizely/java-sdk). diff --git a/build.gradle b/build.gradle index 730711c3..3330af65 100644 --- a/build.gradle +++ b/build.gradle @@ -102,11 +102,6 @@ task cleanAllModules () { task testAllModules () { logger.info("Running android tests for all modules") - dependsOn('testAllModulesTravis', ':test-app:connectedAndroidTest') -} - -task testAllModulesTravis () { - logger.info("Running android tests for Travis") dependsOn(':android-sdk:connectedAndroidTest', ':android-sdk:test', ':event-handler:connectedAndroidTest', ':event-handler:test', ':datafile-handler:connectedAndroidTest', ':datafile-handler:test', From 40908ec4ea055ed17a43269e44c1de7eb437c2a8 Mon Sep 17 00:00:00 2001 From: Muzahidul Islam Date: Mon, 27 Jan 2025 22:38:58 +0600 Subject: [PATCH 2/5] clean up --- .github/workflows/android.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 98ba6c4d..cd314f6d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -135,21 +135,7 @@ jobs: force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true - script: ./gradlew task testAllModules () { - logger.info("Running android tests for all modules") - dependsOn('testAllModules', ':test-app:connectedAndroidTest') -} - - task testAllModules () { - logger.info("Running android tests for Travis") - dependsOn(':android-sdk:connectedAndroidTest', ':android-sdk:test', - ':event-handler:connectedAndroidTest', ':event-handler:test', - ':datafile-handler:connectedAndroidTest', ':datafile-handler:test', - ':user-profile:connectedAndroidTest', - ':shared:connectedAndroidTest', - ':odp:connectedAndroidTest', ':odp:test' - ) -} + script: ./gradlew testAllModules publish: if: startsWith(github.ref, 'refs/tags/') uses: optimizely/android-sdk/.github/workflows/build.yml@master From 34c9da2ebac33f2c68d834448925f7ed8cffb2d9 Mon Sep 17 00:00:00 2001 From: Muzahidul Islam Date: Mon, 17 Feb 2025 22:56:31 +0600 Subject: [PATCH 3/5] update yml --- .github/workflows/android.yml | 15 ++++++--------- .github/workflows/build.yml | 4 ++-- CONTRIBUTING.md | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index cd314f6d..824ca1a4 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -35,8 +35,8 @@ jobs: with: # You should create a personal access token and store it in your repository token: ${{ secrets.CI_USER_TOKEN }} - repository: 'optimizely/travisci-tools' - path: 'home/runner/travisci-tools' + repository: 'optimizely/ci-helper-tools' + path: 'home/runner/ci-helper-tools' ref: 'master' - name: set SDK Branch if PR @@ -45,14 +45,12 @@ jobs: if: ${{ github.event_name == 'pull_request' }} run: | echo "SDK_BRANCH=$HEAD_REF" >> $GITHUB_ENV - echo "TRAVIS_BRANCH=$HEAD_REF" >> $GITHUB_ENV - name: set SDK Branch if not pull request env: REF_NAME: ${{github.ref_name}} if: ${{ github.event_name != 'pull_request' }} run: | echo "SDK_BRANCH=$REF_NAME" >> $GITHUB_ENV - echo "TRAVIS_BRANCH=$REF_NAME" >> $GITHUB_ENV - name: Trigger build env: SDK: android @@ -68,14 +66,13 @@ jobs: PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} UPSTREAM_SHA: ${{ github.sha }} - TOKEN: ${{ secrets.TRAVIS_COM_TOKEN }} EVENT_MESSAGE: ${{ github.event.message }} HOME: 'home/runner' run: | echo "$GITHUB_CONTEXT" - home/runner/travisci-tools/trigger-script-with-status-update.sh + home/runner/ci-helper-tools/trigger-script-with-status-update.sh build: - uses: optimizely/android-sdk/.github/workflows/build.yml@master + uses: optimizely/android-sdk/.github/workflows/build.yml@muzahid/remove-travis with: action: build test: @@ -141,7 +138,7 @@ jobs: uses: optimizely/android-sdk/.github/workflows/build.yml@master with: action: ship - travis_tag: ${GITHUB_REF#refs/*/} + github_tag: ${GITHUB_REF#refs/*/} secrets: MAVEN_SIGNING_KEY_BASE64: ${{ secrets.MAVEN_SIGNING_KEY_BASE64 }} MAVEN_SIGNING_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_PASSPHRASE }} @@ -153,7 +150,7 @@ jobs: uses: optimizely/android-sdk/.github/workflows/build.yml@master with: action: ship - travis_tag: BB-SNAPSHOT + github_tag: BB-SNAPSHOT secrets: MAVEN_SIGNING_KEY_BASE64: ${{ secrets.MAVEN_SIGNING_KEY_BASE64 }} MAVEN_SIGNING_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_PASSPHRASE }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 769fc4d0..97ab9878 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: action: required: true type: string - travis_tag: + github_tag: required: false type: string secrets: @@ -39,4 +39,4 @@ jobs: MAVEN_SIGNING_PASSPHRASE: ${{ secrets.MAVEN_SIGNING_PASSPHRASE }} MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} - run: TRAVIS_TAG=${{ inputs.travis_tag }} ./gradlew ${{ inputs.action }} + run: github_tag=${{ inputs.github_tag }} ./gradlew ${{ inputs.action }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 856bf241..51e2b104 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ We welcome contributions and feedback! All contributors must sign our [Contribut 7. Open a pull request from `YOUR_NAME/branch_name` to `master`. 8. A repository maintainer will review your pull request and, if all goes well, squash and merge it! -All branches will be built and run against the entire test suite on Travis with every commit. +All branches will be built and run against the entire test suite on Gtihub Actions with every commit. The `test-app` module is built against a real Optimizely project. Changing the project ID will cause tests to fail. The test app should be used as a reference. From d95f25dc7426ac46bc22388ea3590b2d65233453 Mon Sep 17 00:00:00 2001 From: Muzahidul Islam Date: Mon, 17 Feb 2025 23:13:42 +0600 Subject: [PATCH 4/5] update yml --- .github/workflows/android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 824ca1a4..7b4420c1 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -135,7 +135,7 @@ jobs: script: ./gradlew testAllModules publish: if: startsWith(github.ref, 'refs/tags/') - uses: optimizely/android-sdk/.github/workflows/build.yml@master + uses: optimizely/android-sdk/.github/workflows/build.yml@muzahid/remove-travis with: action: ship github_tag: ${GITHUB_REF#refs/*/} @@ -147,7 +147,7 @@ jobs: snapshot: if: ${{ github.event.inputs.SNAPSHOT == 'true' && github.event_name == 'workflow_dispatch' }} - uses: optimizely/android-sdk/.github/workflows/build.yml@master + uses: optimizely/android-sdk/.github/workflows/build.yml@muzahid/remove-travis with: action: ship github_tag: BB-SNAPSHOT From ba5fe70b82623347532cf10473739560f9447bda Mon Sep 17 00:00:00 2001 From: Muzahidul Islam <129880873+muzahidul-opti@users.noreply.github.com> Date: Tue, 18 Feb 2025 08:38:34 +0600 Subject: [PATCH 5/5] update yml --- .github/workflows/android.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 7b4420c1..e1e3820a 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -72,7 +72,7 @@ jobs: echo "$GITHUB_CONTEXT" home/runner/ci-helper-tools/trigger-script-with-status-update.sh build: - uses: optimizely/android-sdk/.github/workflows/build.yml@muzahid/remove-travis + uses: optimizely/android-sdk/.github/workflows/build.yml@master with: action: build test: @@ -135,7 +135,7 @@ jobs: script: ./gradlew testAllModules publish: if: startsWith(github.ref, 'refs/tags/') - uses: optimizely/android-sdk/.github/workflows/build.yml@muzahid/remove-travis + uses: optimizely/android-sdk/.github/workflows/build.yml@master with: action: ship github_tag: ${GITHUB_REF#refs/*/} @@ -147,7 +147,7 @@ jobs: snapshot: if: ${{ github.event.inputs.SNAPSHOT == 'true' && github.event_name == 'workflow_dispatch' }} - uses: optimizely/android-sdk/.github/workflows/build.yml@muzahid/remove-travis + uses: optimizely/android-sdk/.github/workflows/build.yml@master with: action: ship github_tag: BB-SNAPSHOT