Skip to content

Commit

Permalink
ci: bump up to Android 13 and add in CI improvements (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
mchuangatmp authored Oct 24, 2022
1 parent 6d4e218 commit a02e72c
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 40 deletions.
13 changes: 9 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
## Instructions
1. PR target branch should be against main
2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

## Summary
{provide a thorough description of the changes}
- {provide a thorough description of the changes}

## Testing Plan
{explain how this has been tested, and what additional testing should be done}
- {explain how this has been tested, and what additional testing should be done}

## Master Issue
Closes https://go.mparticle.com/work/REPLACEME
## Reference Issue
- Closes https://go.mparticle.com/work/REPLACEME
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
target-branch: "main"
labels: ["dependabot"]
open-pull-requests-limit: 10
ignore:
- dependency-name: "com.google.firebase:firebase-messaging"
commit-message:
prefix: "chore"
27 changes: 14 additions & 13 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ jobs:
unit-tests:
name: "Unit Tests"
timeout-minutes: 15
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
repository: ${{github.event.pull_request.head.repo.full_name}}
ref: ${{github.head_ref}}
- name: "Install JDK 11"
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
Expand All @@ -22,27 +23,27 @@ jobs:
uses: asadmansr/android-test-report-action@v1.2.0
if: ${{ always() }}
- name: "Archive Unit Test Results"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: "unit-tests-results"
path: ./**/build/reports/**
lint-checks:
name: "Lint Checks"
timeout-minutes: 15
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: "Install JDK 11"
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
- name: "Run Lint"
run: ./gradlew lint --info
run: ./gradlew lint
- name: "Archive Lint Test Results"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: "lint-results"
Expand All @@ -53,17 +54,17 @@ jobs:
runs-on: macos-latest
steps:
- name: "Checkout Branch"
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: "Install JDK 11"
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
- name: "Run Android Core SDK Kotlin Lint"
run: ./gradlew ktlintCheck
- name: "Archive Kotlin Lint Test Results"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: "kotlin-lint-results"
path: ./**/build/reports/**
path: ./**/build/reports/**
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ jobs:
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
GIT_AUTHOR_NAME: mparticle-bot
GIT_AUTHOR_NAME: mparticle-automation
GIT_AUTHOR_EMAIL: developers@mparticle.com
GIT_COMMITTER_NAME: mparticle-bot
GIT_COMMITTER_NAME: mparticle-automation
GIT_COMMITTER_EMAIL: developers@mparticle.com
steps:
- name: "Checkout public main branch"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.MP_SEMANTIC_RELEASE_BOT }}
fetch-depth: 0
ref: main
- name: "Import GPG Key"
uses: crazy-max/ghaction-import-gpg@v4
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
Expand Down Expand Up @@ -69,11 +70,11 @@ jobs:
mavenSigningKeyPassword: ${{ secrets.MAVEN_CENTRAL_SIGNING_KEY_PASSWORD }}
steps:
- name: "Checkout"
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: main
- name: "Install JDK 11"
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
jobs:
pr-branch-check-name:
name: "Check PR for semantic branch name"
uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-check-name.yml@stable
uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-check-name.yml@main
pr-title-check:
name: "Check PR for semantic title"
uses: mParticle/mparticle-workflows/.github/workflows/pr-title-check.yml@stable
uses: mParticle/mparticle-workflows/.github/workflows/pr-title-check.yml@main
pr-branch-target-gitflow:
name: "Check PR for semantic target branch"
uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-target-continuous.yml@stable
uses: mParticle/mparticle-workflows/.github/workflows/pr-branch-target-continuous.yml@main
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
7 changes: 4 additions & 3 deletions media/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ ext["kitDescription"] = "Media Api to supplement core SDK"
apply(from= "../.scripts/maven.gradle")

android {
compileSdk = 31
namespace = "com.mparticle.media"
compileSdk = 33
defaultConfig {
minSdk = 16
targetSdk = 31
targetSdk = 33
}
lint {
abortOnError = false
abortOnError = true
}
}

Expand Down
5 changes: 1 addition & 4 deletions media/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mparticle.media">

</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
2 changes: 1 addition & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module.exports = {
{
assets: ["CHANGELOG.md", "build.gradle", "README.md"],
message:
"chore(release): ${nextRelease.version} \n\n${nextRelease.notes}",
"chore: ${nextRelease.version} (release) \n\n${nextRelease.notes}",
},
],
],
Expand Down
9 changes: 4 additions & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ pluginManagement {
gradlePluginPortal()
}
plugins {
id("com.android.library") version "7.1.3"
id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
kotlin("android") version "1.6.20"
id("org.sonarqube") version "3.3"
id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
id("com.android.library") version "7.3.1"
id("org.jlleitschuh.gradle.ktlint") version "11.0.0"
kotlin("android") version "1.7.20"
id("org.sonarqube") version "3.4.0.2513"
}
}

0 comments on commit a02e72c

Please sign in to comment.