diff --git a/.github/workflows/cross-platform-tests.yml b/.github/workflows/cross-platform-tests.yml index 19a5604a8..fd556c51f 100644 --- a/.github/workflows/cross-platform-tests.yml +++ b/.github/workflows/cross-platform-tests.yml @@ -7,12 +7,12 @@ jobs: runs-on: macOS-12 steps: - name: "Checkout Cross Platform Tests Repo" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: mParticle/crossplatform-sdk-tests - name: "Checkout Android SDK Branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ${{github.event.pull_request.head.repo.full_name}} ref: ${{github.head_ref}} @@ -40,11 +40,11 @@ jobs: disable-animations: false script: echo "Generated AVD snapshot for caching." - - name: "Install JDK 11" - uses: actions/setup-java@v3 + - name: "Install JDK 17" + uses: actions/setup-java@v4 with: distribution: "zulu" - java-version: "11" + java-version: "17" - name: "Run Crossplatform Tests" uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #v2.28.0 with: @@ -53,9 +53,10 @@ jobs: emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true script: ./gradlew runAndroid - - name: "Archive Test Results" + - name: "Archive CPT Test Results" if: ${{ always() }} - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: "test-results" + name: "cpt-test-results" path: Tests/build/reports/androidTests/connected/** + overwrite: true diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 3fabd833d..fd28e3bd0 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -40,7 +40,7 @@ jobs: GIT_COMMITTER_EMAIL: developers@mparticle.com steps: - name: "Clone branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: mparticle/mparticle-android-sdk ref: ${{ inputs.branch_name }} @@ -71,12 +71,12 @@ jobs: needs: create-regression-branch steps: - name: "Checkout future release branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: mparticle/mparticle-android-sdk ref: regression/${{ github.run_number }} - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" @@ -90,12 +90,13 @@ jobs: #Disable benchmark tests as they do not work on emulators adb uninstall com.mparticle.kits.test; ./gradlew connectedCheck --stacktrace ./gradlew :android-core:cAT :android-kit-base:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none - - name: "Archive Instrumented Test Results" - uses: actions/upload-artifact@v3 + - name: "Archive Daily Instrumented Test Results" + uses: actions/upload-artifact@v4 if: always() with: - name: instrumented-test-results + name: "daily-instrumented-test-results" path: android-core/build/reports/androidTests/connected/** + overwrite: true instrumented-orchestrator-tests: name: "Instrumented Orchestrator Tests" @@ -104,12 +105,12 @@ jobs: needs: create-regression-branch steps: - name: "Checkout Branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: mparticle/mparticle-android-sdk ref: regression/${{ github.run_number }} - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" @@ -119,12 +120,13 @@ jobs: with: api-level: 29 script: ./gradlew -Porchestrator=true :android-core:cAT --stacktrace - - name: "Archive Instrumented Orchestrator Tests Results" - uses: actions/upload-artifact@v3 + - name: "Archive Daily Instrumented Orchestrator Tests Results" + uses: actions/upload-artifact@v4 if: always() with: - name: "instrumented-orchestrator-tests-results" + name: "daily-instrumented-orchestrator-tests-results" path: android-core/build/orchestrator/** + overwrite: true unit-tests: name: "Unit Tests" @@ -133,12 +135,12 @@ jobs: needs: create-regression-branch steps: - name: "Checkout future release branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: mparticle/mparticle-android-sdk ref: regression/${{ github.run_number }} - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" @@ -148,12 +150,13 @@ jobs: - name: "Print Android Unit Tests Report" uses: asadmansr/android-test-report-action@384cd31388782f4106dc4a1b37eea2ff02e0aad7 #v1.2.0 if: always() - - name: "Archive Unit Test Results" - uses: actions/upload-artifact@v3 + - name: "Archive Daily Unit Test Results" + uses: actions/upload-artifact@v4 if: always() with: - name: "unit-tests-results" + name: "daily-unit-tests-results" path: ./**/build/reports/** + overwrite: true lint-checks: name: "Lint Checks" @@ -162,12 +165,12 @@ jobs: needs: create-regression-branch steps: - name: "Checkout Branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: regression/${{ github.run_number }} submodules: recursive - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" @@ -179,17 +182,19 @@ jobs: - name: "Run Android Kit Lint" run: ./gradlew publishReleaseLocal -c settings-kits.gradle lint - name: "Archive Test Results" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: - name: "core-lint-results" + name: "daily-core-lint-results" path: ./**/build/reports/** + overwrite: true - name: "Archive Test Kit Results" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: - name: "kit-lint-results" + name: "daily-kit-lint-results" path: kits/**/build/reports/** + overwrite: true kotlin-lint-checks: name: "Kotlin Lint Checks" @@ -198,12 +203,12 @@ jobs: needs: create-regression-branch steps: - name: "Checkout Branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: regression/${{ github.run_number }} submodules: recursive - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" @@ -214,18 +219,20 @@ jobs: run: ./gradlew publishReleaseLocal - name: "Run Android Kit Kotlin Lint" run: ./gradlew publishReleaseLocal -c settings-kits.gradle ktlintCheck - - name: "Archive Test Results" - uses: actions/upload-artifact@v3 + - name: "Archive Daily Test Core Results" + uses: actions/upload-artifact@v4 if: always() with: - name: "core-ktlint-results" + name: "daily-core-ktlint-results" path: ./**/build/reports/** - - name: "Archive Test Kit Results" - uses: actions/upload-artifact@v3 + overwrite: true + - name: "Archive Daily Test Kit Results" + uses: actions/upload-artifact@v4 if: always() with: - name: "kit-ktlint-results" + name: "daily-kit-ktlint-results" path: kits/**/build/reports/** + overwrite: true update-kits: name: "Update Kits" @@ -238,13 +245,13 @@ jobs: GIT_COMMITTER_EMAIL: developers@mparticle.com steps: - name: "Checkout future release branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: mparticle/mparticle-android-sdk ref: regression/${{ github.run_number }} submodules: recursive - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" @@ -266,7 +273,7 @@ jobs: GIT_COMMITTER_EMAIL: developers@mparticle.com steps: - name: "Checkout public main branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 ref: main @@ -297,7 +304,7 @@ jobs: GIT_COMMITTER_EMAIL: developers@mparticle.com steps: - name: "Checkout repo" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 repository: ${{ github.repository }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index a7aeb3c17..2d222f2be 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout Branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" @@ -52,12 +52,13 @@ jobs: # Disable benchmark tests as they do not work on emulators adb uninstall com.mparticle.kits.test; ./gradlew connectedCheck --stacktrace ./gradlew :android-core:cAT :android-kit-base:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none - - name: "Archive Instrumented Tests Results" - uses: actions/upload-artifact@v3 + - name: "Archive PR Instrumented Tests Results" + uses: actions/upload-artifact@v4 if: always() with: - name: "instrumented-tests-results" + name: "pr-instrumented-tests-results" path: android-core/build/reports/androidTests/connected/** + overwrite: true instrumented-orchestrator-tests: name: "Instrumented Orchestrator Tests" @@ -65,9 +66,9 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout Branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" @@ -99,21 +100,23 @@ jobs: # Disable benchmark tests as they do not work on emulators adb uninstall com.mparticle.test; ./gradlew connectedCheck --stacktrace ./gradlew -Porchestrator=true :android-core:cAT -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=none - - name: "Archive Instrumented Orchestrator Tests Results" - uses: actions/upload-artifact@v3 + - name: "Archive PR Instrumented Orchestrator Tests Results" + uses: actions/upload-artifact@v4 if: always() with: - name: "instrumented-orchestrator-tests-results" + name: "pr-instrumented-orchestrator-tests-results" path: android-core/build/orchestrator/** + overwrite: true + unit-tests: name: "Unit Tests" timeout-minutes: 15 runs-on: ubuntu-latest steps: - name: "Checkout Branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" @@ -122,12 +125,13 @@ jobs: - name: "Print Android Unit Tests Report" uses: asadmansr/android-test-report-action@384cd31388782f4106dc4a1b37eea2ff02e0aad7 #v1.2.0 if: always() - - name: "Archive Unit Test Results" - uses: actions/upload-artifact@v3 + - name: "Archive PR Unit Test Results" + uses: actions/upload-artifact@v4 if: always() with: - name: "unit-tests-results" + name: "pr-unit-tests-results" path: ./**/build/reports/** + overwrite: true lint-checks: name: "Lint Checks" @@ -135,22 +139,23 @@ jobs: runs-on: macos-latest steps: - name: "Checkout Branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" - name: "Run Android Core SDK Lint" run: ./gradlew lint - - name: "Archive Lint Test Results" - uses: actions/upload-artifact@v3 + - name: "Archive PR Lint Test Results" + uses: actions/upload-artifact@v4 if: always() with: - name: "lint-results" + name: "pr-lint-results" path: ./**/build/reports/** + overwrite: true kotlin-lint-checks: name: "Kotlin Lint Checks" @@ -158,22 +163,23 @@ jobs: runs-on: macos-latest steps: - name: "Checkout Branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" - name: "Run Android Core SDK Kotlin Lint" run: ./gradlew ktlintCheck - - name: "Archive Kotlin Lint Test Results" - uses: actions/upload-artifact@v3 + - name: "Archive PR Kotlin Lint Test Results" + uses: actions/upload-artifact@v4 if: always() with: - name: "kotlin-lint-results" + name: "pr-kotlin-lint-results" path: ./**/build/reports/** + overwrite: true security-checks: name: "Security Lint Checks" @@ -187,12 +193,12 @@ jobs: if: github.event_name == 'pull_request' steps: - name: "Checkout Branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive fetch-depth: 0 - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7118aa02..3ed53a8c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: GIT_COMMITTER_EMAIL: developers@mparticle.com steps: - name: "Checkout development branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }} repository: mparticle/mparticle-android-sdk @@ -72,7 +72,7 @@ jobs: GIT_COMMITTER_EMAIL: developers@mparticle.com steps: - name: "Checkout public main branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }} fetch-depth: 0 @@ -125,13 +125,13 @@ jobs: mavenSigningKeyPassword: ${{ secrets.MAVEN_CENTRAL_SIGNING_KEY_PASSWORD }} steps: - name: "Checkout release branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: mparticle/mparticle-android-sdk ref: release/${{ github.run_number }} submodules: recursive - name: "Install JDK 17" - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: "zulu" java-version: "17" @@ -152,7 +152,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout main branch" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 repository: ${{ github.repository }}