feat(ci): shard test suite and enable JUnit 5 parallel execution (#4977)

This commit is contained in:
James Rich 2026-04-03 08:08:49 -05:00 committed by GitHub
parent 7e041c00e1
commit 51251ab16a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
80 changed files with 438 additions and 2730 deletions

View file

@ -1,22 +0,0 @@
/*
* Copyright (c) 2025-2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.meshtastic.app
import androidx.test.runner.AndroidJUnitRunner
@Suppress("unused")
class TestRunner : AndroidJUnitRunner()

View file

@ -25,13 +25,13 @@ import androidx.work.WorkerParameters
import io.ktor.client.HttpClient
import io.ktor.client.engine.HttpClientEngine
import kotlinx.coroutines.CoroutineDispatcher
import org.junit.Test
import org.koin.test.verify.definition
import org.koin.test.verify.injectedParameters
import org.koin.test.verify.verify
import org.meshtastic.app.map.MapViewModel
import org.meshtastic.core.model.util.NodeIdLookup
import org.meshtastic.feature.node.metrics.MetricsViewModel
import kotlin.test.Test
class KoinVerificationTest {

View file

@ -16,9 +16,9 @@
*/
package org.meshtastic.app.ui
import org.junit.Assert.assertEquals
import org.junit.Test
import org.meshtastic.core.model.util.getInitials
import kotlin.test.Test
import kotlin.test.assertEquals
class UIUnitTest {
@Test

View file

@ -16,11 +16,12 @@
*/
package org.meshtastic.app.ui.metrics
import org.junit.Assert.assertEquals
import org.junit.Test
import org.meshtastic.core.model.util.UnitConversions.celsiusToFahrenheit
import org.meshtastic.proto.EnvironmentMetrics
import org.meshtastic.proto.Telemetry
import kotlin.math.abs
import kotlin.test.Test
import kotlin.test.assertTrue
class EnvironmentMetricsTest {
@ -65,11 +66,12 @@ class EnvironmentMetricsTest {
val resultTelemetry = processedTelemetries.first()
assertEquals(expectedTemperatureFahrenheit, resultTelemetry.environment_metrics?.temperature ?: 0f, 0.01f)
assertEquals(
expectedSoilTemperatureFahrenheit,
resultTelemetry.environment_metrics?.soil_temperature ?: 0f,
0.01f,
assertTrue(
abs(expectedTemperatureFahrenheit - (resultTelemetry.environment_metrics?.temperature ?: 0f)) < 0.01f,
)
assertTrue(
abs(expectedSoilTemperatureFahrenheit - (resultTelemetry.environment_metrics?.soil_temperature ?: 0f)) <
0.01f,
)
}
}