Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump updates #274

Merged
merged 26 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci-label-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
sync-labels:
uses: bitpogo/workflows/.github/workflows/shared-label-sync.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-label-sync.yml@main
with:
labels-path: .github/labels.yml
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
add-pr-labels:
uses: bitpogo/workflows/.github/workflows/shared-labeler.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-labeler.yml@main
with:
labels-path: .github/labeler.yml
secrets:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-pull-request-formcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ on:

jobs:
pull-request-precheck:
uses: bitpogo/workflows/.github/workflows/shared-pull-request-form-check.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-pull-request-form-check.yml@main
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
17 changes: 7 additions & 10 deletions .github/workflows/ci-pull-request-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ on:

jobs:
build:
uses: bitpogo/workflows/.github/workflows/shared-build-macos.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-build-macos.yml@main
concurrency:
group: build-macos-${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

coding-conventions:
needs: build
uses: bitpogo/workflows/.github/workflows/shared-coding-conventions-macos.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-coding-conventions-macos.yml@main
with:
cache-reports: true
detekt: true
Expand All @@ -32,10 +32,9 @@ jobs:

check-android:
needs: build
uses: bitpogo/workflows/.github/workflows/shared-test-android-macos.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-test-android-macos.yml@main
with:
# projects: "[':playground', ':integration-kmp', ':integration-android-application']"
projects: "[':playground']"
projects: "[':integration-kmp', ':integration-android-application']"
api-level: "['31']"
arch: "['x86_64']"
coverage: true
Expand All @@ -46,7 +45,7 @@ jobs:

coverage:
needs: [coding-conventions, check-android]
uses: bitpogo/workflows/.github/workflows/shared-coverage-macos.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-coverage-macos.yml@main
with:
jvm: true
verify-kmp: true
Expand All @@ -61,7 +60,7 @@ jobs:

check:
needs: build
uses: bitpogo/workflows/.github/workflows/shared-test-kmp.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-test-kmp.yml@main
with:
platforms: "['ios', 'macos', 'tvos', 'watchos', 'linux-js', 'mingw']"
concurrency:
Expand All @@ -70,9 +69,7 @@ jobs:

publish:
needs: [ coverage, check ]
uses: bitpogo/workflows/.github/workflows/shared-publish-pull-request.yml@v1.0.0
with:
uses-mips: false
uses: bitpogo/workflows/.github/workflows/shared-publish-pull-request.yml@main
secrets:
upload-username: ${{ secrets.PACKAGE_REGISTRY_UPLOAD_USERNAME }}
upload-token: ${{ secrets.PACKAGE_REGISTRY_UPLOAD_TOKEN }}
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ on:

jobs:
build:
uses: bitpogo/workflows/.github/workflows/shared-build-macos.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-build-macos.yml@main
concurrency:
group: build-macos
cancel-in-progress: true

check-android:
needs: build
uses: bitpogo/workflows/.github/workflows/shared-test-android-macos.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-test-android-macos.yml@main
with:
# projects: "[':playground', ':integration-kmp', ':integration-android-application']"
projects: "[':playground']"
projects: "[':integration-kmp', ':integration-android-application']"
api-level: "['31']"
arch: "['x86_64']"
coverage: false
Expand All @@ -28,7 +27,7 @@ jobs:

check:
needs: build
uses: bitpogo/workflows/.github/workflows/shared-test-kmp.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-test-kmp.yml@main
with:
cleanup: false
platforms: "['ios', 'macos', 'tvos', 'watchos', 'linux-all', 'mingw']"
Expand All @@ -38,7 +37,7 @@ jobs:

docs:
needs: [ check, check-android ]
uses: bitpogo/workflows/.github/workflows/shared-mkdocs-release.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-mkdocs-release.yml@main
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
concurrency:
Expand All @@ -47,9 +46,7 @@ jobs:

publish:
needs: [ check, check-android ]
uses: bitpogo/workflows/.github/workflows/shared-publish-release.yml@v1.0.0
with:
uses-mips: false
uses: bitpogo/workflows/.github/workflows/shared-publish-release.yml@main
secrets:
upload-username: ${{ secrets.PACKAGE_REGISTRY_UPLOAD_USERNAME }}
upload-token: ${{ secrets.PACKAGE_REGISTRY_UPLOAD_TOKEN }}
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/ci-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ concurrency:

jobs:
build:
uses: bitpogo/workflows/.github/workflows/shared-build-macos.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-build-macos.yml@main
concurrency:
group: build-macos
cancel-in-progress: true

coding-conventions:
needs: build
uses: bitpogo/workflows/.github/workflows/shared-coding-conventions-macos.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-coding-conventions-macos.yml@main
with:
cache-reports: true
detekt: true
Expand All @@ -31,10 +31,9 @@ jobs:

check-android:
needs: build
uses: bitpogo/workflows/.github/workflows/shared-test-android-macos.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-test-android-macos.yml@main
with:
# projects: "[':playground', ':integration-kmp', ':integration-android-application']"
projects: "[':playground']"
projects: "[':integration-kmp', ':integration-android-application']"
api-level: "['31']"
arch: "['x86_64']"
coverage: true
Expand All @@ -45,7 +44,7 @@ jobs:

coverage:
needs: [ coding-conventions, check-android ]
uses: bitpogo/workflows/.github/workflows/shared-coverage-macos.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-coverage-macos.yml@main
with:
jvm: true
verify-kmp: true
Expand All @@ -60,7 +59,7 @@ jobs:

check:
needs: build
uses: bitpogo/workflows/.github/workflows/shared-test-kmp.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-test-kmp.yml@main
with:
platforms: "['ios', 'macos', 'tvos', 'watchos', 'linux-js', 'mingw']"
concurrency:
Expand All @@ -69,7 +68,7 @@ jobs:

docs:
needs: [ coverage, check ]
uses: bitpogo/workflows/.github/workflows/shared-mkdocs-snapshot.yml@v1.0.0
uses: bitpogo/workflows/.github/workflows/shared-mkdocs-snapshot.yml@main
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
concurrency:
Expand All @@ -78,9 +77,7 @@ jobs:

publish:
needs: [ coverage, check ]
uses: bitpogo/workflows/.github/workflows/shared-publish-snapshot.yml@v1.0.0
with:
uses-mips: false
uses: bitpogo/workflows/.github/workflows/shared-publish-snapshot.yml@main
secrets:
upload-username: ${{ secrets.PACKAGE_REGISTRY_UPLOAD_USERNAME }}
upload-token: ${{ secrets.PACKAGE_REGISTRY_UPLOAD_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.gradle/
build/
local.properties
build-cache/

# IDEA/Android Studio ignores
*iml
Expand Down
2 changes: 1 addition & 1 deletion .java_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11
17
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Removed

* Deprecated targets

### Fixed

### Security

### Bumped

* Gradle 7.5.1 -> 8.6.0
* Android Gradle Plugin 7.3.1 -> 8.2.2
* Kotlin 1.8.0 -> 1.9.22
* KSP 1.8.0-1.0.8 -> 1.9.22-1.0.17
* AtomicFu 0.19.0 -> 0.23.2
* Stately 1.2.3 -> 2.0.6
* Android Target SDK 32 -> 34
* CompilerTest 1.4.9 -> 0.4.0 (ZacSweers)
* min Java 11 -> 17

## [v0.3.0-rc08](https://github.com/bitPogo/kmock/compare/v0.3.0-rc07...v0.3.0-rc08)

### Bumped
Expand Down
62 changes: 29 additions & 33 deletions Dangerfile.df.kts
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
/*
* Copyright (c) 2024 Matthias Geisler (bitPogo) / All rights reserved.
*
* Use of this source code is governed by Apache v2.0
*/
import systems.danger.kotlin.danger
import systems.danger.kotlin.fail
import systems.danger.kotlin.onGitHub
import systems.danger.kotlin.warn

danger(args) {
val failCountAdditions = 2000
val warnCountAdditions = 1000
val infoCountAdditions = 500

val minPullRequestSize = 20

val allSourceFiles = git.modifiedFiles + git.createdFiles
val isChangelogUpdated = allSourceFiles.contains("CHANGELOG.md")
val isChangelogUpdated = allSourceFiles.contains("CHANGELOG.adoc")

onGitHub {
val branchName = pullRequest.head.label.substringAfter(":")
val isFeatureBranch = "(?:feature\\/(?:add|deprecate|change|remove|fix|bump|security)-[a-z0-9-.]*)"
.toRegex()
.matches(branchName)
val isReleaseBranch = "(?:release\\/(?:\\d{1,3}\\.\\d{1,3}(?:\\.\\d{1,3})?(?:-rc\\d{1,3})?)(?:\\/prepare-\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(?:-rc\\d{1,3})?)?)"
.toRegex()
.matches(branchName)
val isDependabotBranch = "dependabot/(.*)"
.toRegex()
.matches(branchName)
val isBugfixBranch = "bugfix/(.*)"
.toRegex()
.matches(branchName)
val isFeatureTitle = "(?:(?:\\[[A-Z]{2,8}-\\d{1,6}\\]\\s)?(?:Add|Change|Remove|Fix|Bump|Security)\\s.*)"
.toRegex()
.matches(pullRequest.title)
val isReleaseTitle = "(?:(?:Prepare )?Release \\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(?:-rc\\d{1,3})?)"
val isFeatureBranch =
"(?:(?::feature\\/)?(?:(?:add|update|change|remove|fix|bump|security)-)[a-zA-Z][a-zA-Z0-9-.]*)"
.toRegex()
.matches(branchName)
val isReleaseBranch =
"(?:release\\/(?:\\d{1,3}\\.\\d{1,3}(?:\\.\\d{1,3})?)(?:\\/prepare-\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})?)"
.toRegex()
.matches(branchName)
val isDependabotBranch =
"dependabot/(.*)"
.toRegex()
.matches(branchName)
val isFeatureTitle =
"(?:(?:\\[[A-Z]{2,8}-\\d{1,6}\\]\\s)?(?:Add|Update|Change|Remove|Fix|Bump|Security)\\s.*)"
.toRegex()
.matches(pullRequest.title)
val isReleaseTitle = "(?:(?:Prepare )?Release \\d{1,3}\\.\\d{1,3}\\.\\d{1,3})"
.toRegex()
.matches(pullRequest.title)

if (!isFeatureBranch && !isBugfixBranch && !isReleaseBranch && !isDependabotBranch) {

if (!isFeatureBranch && !isReleaseBranch && !isDependabotBranch) {
fail(
"Branch name is not following our pattern:\n" +
"\nrelease/1.2(.3)(/prepare-1.2.3)\n" +
Expand All @@ -48,7 +49,7 @@ danger(args) {
if (!isFeatureTitle) {
fail(
"Title is not following our pattern:\n" +
"\nAdd|Change|Remove|Fix|Bump|Security {Core or Plugin title}"
"\nAdd|Change|Remove|Fix|Bump|Security {Feature title}"
)
}
}
Expand All @@ -72,9 +73,6 @@ danger(args) {

when {
pullRequest.body == null -> warn("Please include a description of your PR changes")
(pullRequest.body as String).length < minPullRequestSize -> {
warn("Please include a expresive description of your PR changes")
}
else -> {/* do nothing*/}
}

Expand All @@ -86,11 +84,9 @@ danger(args) {
// Size
val changes = (pullRequest.additions ?: 0) - (pullRequest.deletions ?: 0)
when {
changes > failCountAdditions -> {
fail("This Pull-Request is way to big, please slice it into smaller pull-requests.")
}
changes > warnCountAdditions -> warn("Too Big Pull-Request, keep changes smaller")
changes > infoCountAdditions -> warn("Large Pull-Request, try to keep changes smaller if you can")
changes > 2000 -> fail("This Pull-Request is way to big, please slice it into smaller pull-requests.")
changes > 1000 -> warn("Too Big Pull-Request, keep changes smaller")
changes > 500 -> warn("Large Pull-Request, try to keep changes smaller if you can")
else -> {/* do nothing */}
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ Please take a look [here](https://github.com/bitPogo/kmock/tree/main/docs/src/de

## Copyright and License

Copyright (c) 2023 Matthias Geisler / All rights reserved.
Copyright (c) 2024 Matthias Geisler / All rights reserved.

Please refer to the [License](https://github.com/bitPogo/kmock/blob/main/LICENSE) for further details.
Loading
Loading