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
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ updates:
directory: /
schedule:
interval: weekly
cooldown:
default-days: 7
open-pull-requests-limit: 4
labels:
- dependabot
16 changes: 10 additions & 6 deletions .github/workflows/android-kit-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,29 @@ on:
default: "development"
type: string

jobs:
permissions:
contents: read
pull-requests: read

jobs:
pr-branch-check-name:
name: "Check PR for semantic branch name"
uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-check-name.yml@main
uses: ./.github/workflows/pr-branch-check-name.yml # zizmor: ignore[self-repository]

pr-title-check:
name: "Check PR for semantic title"
uses: mParticle/mparticle-workflows/.github/workflows/pr-title-check.yml@main
uses: ./.github/workflows/pr-title-check.yml # zizmor: ignore[self-repository]

regression-checks:
name: "Run regression"
uses: mParticle/mparticle-workflows/.github/workflows/android-kit-push.yml@main
uses: ./.github/workflows/android-kit-push.yml # zizmor: ignore[self-repository]
with:
dryRun: ${{ inputs.dryRun }}
branch_name: ${{ github.head_ref }}
secrets: inherit

automerge-dependabot:
name: "Save PR Number for Dependabot Automerge"
needs: [ regression-checks ]
uses: mParticle/mparticle-workflows/.github/workflows/dependabot-save-pr-number.yml@main
permissions:
contents: read
uses: ./.github/workflows/dependabot-save-pr-number.yml # zizmor: ignore[self-repository]
79 changes: 49 additions & 30 deletions .github/workflows/android-kit-push.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: "Android Kit Regression Checks"

permissions:
contents: read

on:
workflow_call:
inputs:
Expand All @@ -20,20 +23,22 @@ jobs:
name: "Unit Tests Maven"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: "Install JDK 17"
uses: actions/setup-java@v4
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@v5
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: Clean and Run Unit Tests
continue-on-error: true
run: ./gradlew clean assemble test
- name: "Archive Test Results"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: ${{ always() }}
with:
name: "unit-tests-results-maven"
Expand All @@ -44,26 +49,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: kit
ref: ${{ inputs.branch_name }}
- name: "Checkout Core"
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: mParticle/android-sdk
fetch-depth: 0
path: core
ref: main
- name: "Install JDK 17"
uses: actions/setup-java@v4
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@v5
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: "Build Core"
working-directory: core
run: ./gradlew publishLocal -PisRelease=true
Expand All @@ -82,9 +89,11 @@ jobs:
echo "coreVersion=$VERSION" >> $GITHUB_OUTPUT
- name: "Clean and Run Unit Tests"
working-directory: kit
run: ./gradlew clean assemble test -Pversion=${{ steps.core-version.outputs.coreVersion }}
env:
CORE_VERSION: ${{ steps.core-version.outputs.coreVersion }}
run: ./gradlew clean assemble test -Pversion="$CORE_VERSION"
- name: "Archive Test Results"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: ${{ always() }}
with:
name: "unit-tests-results-development"
Expand All @@ -95,23 +104,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ inputs.branch_name }}
- name: "Install JDK 17"
uses: actions/setup-java@v4
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@v5
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: "Run Lint"
continue-on-error: true
run: ./gradlew lint
- name: "Archive Lint Results"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: ${{ always() }}
with:
name: "lint-results-maven"
Expand All @@ -122,26 +132,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: kit
ref: ${{ inputs.branch_name }}
- name: "Checkout Core"
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: mParticle/android-sdk
fetch-depth: 0
path: core
ref: main
- name: "Install JDK 17"
uses: actions/setup-java@v4
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@v5
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: "Build Core"
working-directory: core
run: ./gradlew publishLocal -PisRelease=true
Expand All @@ -160,9 +172,11 @@ jobs:
echo "coreVersion=$VERSION" >> $GITHUB_OUTPUT
- name: "Clean and Run Unit Tests"
working-directory: kit
run: ./gradlew lint -Pversion=${{ steps.core-version.outputs.coreVersion }}
env:
CORE_VERSION: ${{ steps.core-version.outputs.coreVersion }}
run: ./gradlew lint -Pversion="$CORE_VERSION"
- name: "Archive Lint Results"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: ${{ always() }}
with:
name: "lint-results-development"
Expand All @@ -173,23 +187,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ inputs.branch_name }}
- name: "Install JDK 17"
uses: actions/setup-java@v4
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@v5
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: "Run Kotlin Lint"
continue-on-error: true
run: ./gradlew ktlintCheck
- name: "Archive Lint Results"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: ${{ always() }}
with:
name: "kotlin-lint-results-maven"
Expand All @@ -200,26 +215,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: ${{ github.event.pull_request.head.repo.full_name }}
path: kit
ref: ${{ inputs.branch_name }}
- name: "Checkout Core"
uses: actions/checkout@v4
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
repository: mParticle/android-sdk
fetch-depth: 0
path: core
ref: main
- name: "Install JDK 17"
uses: actions/setup-java@v4
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
distribution: "zulu"
java-version: "17"
cache: "gradle"
- name: "Setup Gradle"
uses: gradle/actions/setup-gradle@v5
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- name: "Build Core"
working-directory: core
run: ./gradlew publishLocal -PisRelease=true
Expand All @@ -238,9 +255,11 @@ jobs:
echo "coreVersion=$VERSION" >> $GITHUB_OUTPUT
- name: "Clean and Run Unit Tests"
working-directory: kit
run: ./gradlew ktlintCheck -Pversion=${{ steps.core-version.outputs.coreVersion }}
env:
CORE_VERSION: ${{ steps.core-version.outputs.coreVersion }}
run: ./gradlew ktlintCheck -Pversion="$CORE_VERSION"
- name: "Archive Lint Results"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: ${{ always() }}
with:
name: "kotlin-lint-results-development"
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/android-kit-release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: "Android Kit Release SDK"

on:
Expand All @@ -10,25 +9,30 @@ on:
default: "false"
type: string

permissions: {}

jobs:
# SDK release is done from public main branch.
confirm-public-repo-main-branch:
name: "Confirm release is run from public/main branch"
uses: mParticle/mparticle-workflows/.github/workflows/sdk-release-repo-branch-check.yml@main
permissions:
contents: read
uses: ./.github/workflows/sdk-release-repo-branch-check.yml # zizmor: ignore[self-repository]

create-release-branch:
name: "Create Release Branch"
runs-on: ubuntu-latest
needs: confirm-public-repo-main-branch
permissions: {}
env:
GITHUB_TOKEN: ${{ secrets.MP_INTEGRATIONS_SEMANTIC_RELEASE_BOT }}
GIT_AUTHOR_NAME: mparticle-automation
GIT_AUTHOR_EMAIL: developers@mparticle.com
GIT_COMMITTER_NAME: mparticle-automation
GIT_COMMITTER_EMAIL: developers@mparticle.com
steps:
- name: "Checkout main branch"
uses: actions/checkout@v4
- name: "Checkout main branch" # zizmor: ignore[artipacked]
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ secrets.MP_INTEGRATIONS_SEMANTIC_RELEASE_BOT }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
Expand All @@ -48,19 +52,21 @@ jobs:
regression-check:
needs: create-release-branch
name: "Run regression"
uses: mParticle/mparticle-workflows/.github/workflows/android-kit-push.yml@main
permissions:
contents: read
uses: ./.github/workflows/android-kit-push.yml # zizmor: ignore[self-repository]
with:
dryRun: ${{ inputs.dryRun }}
branch_name: release/${{ github.run_number }}
secrets: inherit

sync-repository:
name: "Sync Repository"
needs: regression-check
runs-on: ubuntu-latest
permissions: {}
steps:
- name: "Checkout main branch"
uses: actions/checkout@v4
- name: "Checkout main branch" # zizmor: ignore[artipacked]
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
repository: ${{ github.repository }}
Expand Down
Loading
Loading