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

Kyv hackaton pitests #6965

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
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
84 changes: 48 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,42 +70,43 @@ workflows:
ignore: /.*/
default:
jobs:
- prepare-and-assemble
- changelog-verification:
filters:
branches:
ignore: /^(main|release-.*)/
- static-analysis:
requires:
- prepare-and-assemble
- unit-tests-core:
requires:
- prepare-and-assemble
- unit-tests-ui:
requires:
- prepare-and-assemble
- unit-tests-androidauto:
requires:
- prepare-and-assemble
- ui-robo-tests:
requires:
- prepare-and-assemble
- internal-instrumentation-tests:
requires:
- prepare-and-assemble
- instrumentation-tests:
requires:
- prepare-and-assemble
- androidauto-test
- mobile-metrics-dry-run:
type: approval
- mobile-metrics-benchmarks:
requires:
- mobile-metrics-dry-run
- codecov-upload:
requires:
- unit-tests-ui
- unit-tests-core
- run-pitest-core
# - prepare-and-assemble
# - changelog-verification:
# filters:
# branches:
# ignore: /^(main|release-.*)/
# - static-analysis:
# requires:
# - prepare-and-assemble
# - unit-tests-core:
# requires:
# - prepare-and-assemble
# - unit-tests-ui:
# requires:
# - prepare-and-assemble
# - unit-tests-androidauto:
# requires:
# - prepare-and-assemble
# - ui-robo-tests:
# requires:
# - prepare-and-assemble
# - internal-instrumentation-tests:
# requires:
# - prepare-and-assemble
# - instrumentation-tests:
# requires:
# - prepare-and-assemble
# - androidauto-test
# - mobile-metrics-dry-run:
# type: approval
# - mobile-metrics-benchmarks:
# requires:
# - mobile-metrics-dry-run
# - codecov-upload:
# requires:
# - unit-tests-ui
# - unit-tests-core

#------------------------------
#---------- COMMANDS ----------
Expand Down Expand Up @@ -522,6 +523,17 @@ commands:
#---------- JOBS ----------
#--------------------------
jobs:
run-pitest-core:
executor: ndk-r22-latest-executor
resource_class: 2xlarge
steps:
- checkout
- run:
name: Run pitests
command: make pitest-core
- store_artifacts:
path: libnavigation-core/build/reports/pitest

prepare-and-assemble:
executor: ndk-r22-latest-executor
steps:
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,17 @@ update-metalava:
car:
adb forward tcp:5277 tcp:5277
cd $(ANDROID_HOME)/extras/google/auto/ && ./desktop-head-unit

.PHONY: pitest
pitest:
$(call run-gradle-tasks,$(CORE_MODULES),pitestDebug) \
&& $(call run-gradle-tasks,$(UI_MODULES),pitestDebug) \
&& $(call run-gradle-tasks,$(ANDROIDAUTO_MODULES),pitestDebug) \

.PHONY: pitest-libnavigation-core
pitest-core:
./gradlew :libnavigation-core:pitestDebug

.PHONY: pitest-libnavui-dropin
pitest-libnavui-dropin:
./gradlew :libnavui-dropin:pitestDebug
4 changes: 4 additions & 0 deletions android-auto-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
plugins {
id("pl.droidsonroids.pitest") apply(false)
}
apply from: "../gradle/pitest.gradle"
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.mapbox.maps.token'
Expand Down
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
apply from: "${rootDir}/gradle/dependencies.gradle"
repositories {
google()
mavenCentral()
google()
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
Expand All @@ -15,10 +15,12 @@ buildscript {
}
gradlePluginPortal()
}

dependencies {
classpath pluginDependencies.gradle
classpath pluginDependencies.kotlin
classpath pluginDependencies.dependencyUpdates
classpath pluginDependencies.pitest
classpath pluginDependencies.jacoco
classpath pluginDependencies.googleServices
classpath pluginDependencies.license
Expand Down
14 changes: 9 additions & 5 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ ext {
materialDesignVersion : '1.1.0',
autoValue : '1.5.4',
autoValueParcel : '0.2.5',
junit : '4.12',
junit : '4.13.2',
constraintLayout : '1.1.3',
mockito : '2.23.4',
mockkVersion : '1.12.1',
mockkVersion : '1.12.3',
leakCanaryVersion : '2.9.1',
commonsIO : '2.6',
robolectric : '4.7.3',
robolectric : '4.8.1',
mockwebserver : '4.9.0',
gmsLocation : '17.0.0',
ktlint : '0.47.1',
Expand Down Expand Up @@ -154,6 +154,8 @@ ext {
junit : "junit:junit:${version.junit}",
mockito : "org.mockito:mockito-core:${version.mockito}",
mockk : "io.mockk:mockk:${version.mockkVersion}",
mockkAgentApi : "io.mockk:mockk-agent-api:${version.mockkVersion}",
mockkAgentJvm : "io.mockk:mockk-agent-jvm:${version.mockkVersion}",
mockkAndroid : "io.mockk:mockk-android:${version.mockkVersion}",
commonsIO : "commons-io:commons-io:${version.commonsIO}",
robolectric : "org.robolectric:robolectric:${version.robolectric}",
Expand Down Expand Up @@ -191,7 +193,8 @@ ext {
mapboxSdkRegistry : '0.7.0',
mapboxAccessToken : '0.2.1',
mapboxNativeDownload : '0.2.2',
firebaseCrashlytics : '2.5.1'
firebaseCrashlytics : '2.5.1',
pitest : '0.2.9'
]

pluginDependencies = [
Expand All @@ -208,6 +211,7 @@ ext {
mapboxSdkRegistry : "com.mapbox.gradle.plugins:sdk-registry:${pluginVersion.mapboxSdkRegistry}",
mapboxAccessToken : "com.mapbox.gradle.plugins:access-token:${pluginVersion.mapboxAccessToken}",
mapboxNativeDownload : "com.mapbox.gradle.plugins:native-download:${pluginVersion.mapboxNativeDownload}",
firebaseCrashlytics : "com.google.firebase:firebase-crashlytics-gradle:${pluginVersion.firebaseCrashlytics}"
firebaseCrashlytics : "com.google.firebase:firebase-crashlytics-gradle:${pluginVersion.firebaseCrashlytics}",
pitest : "pl.droidsonroids.gradle:gradle-pitest-plugin:${pluginVersion.pitest}"
]
}
Loading