mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-27 02:01:35 -04:00
chore: Enhance CI coverage reporting and add main branch workflow (#4873)
This commit is contained in:
24
.github/workflows/main-check.yml
vendored
Normal file
24
.github/workflows/main-check.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Main CI (Verify & Build)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: main-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
validate-and-build:
|
||||
if: github.repository == 'meshtastic/Meshtastic-Android'
|
||||
uses: ./.github/workflows/reusable-check.yml
|
||||
with:
|
||||
run_lint: true
|
||||
run_unit_tests: true
|
||||
run_instrumented_tests: true
|
||||
api_levels: '[35]' # One API level is enough for post-merge sanity check
|
||||
upload_artifacts: true
|
||||
secrets: inherit
|
||||
2
.github/workflows/reusable-check.yml
vendored
2
.github/workflows/reusable-check.yml
vendored
@@ -89,7 +89,7 @@ jobs:
|
||||
|
||||
- name: Shared Unit Tests & Coverage
|
||||
if: inputs.run_unit_tests == true
|
||||
run: ./gradlew test koverXmlReport app:koverXmlReportFdroidDebug app:koverXmlReportGoogleDebug core:api:koverXmlReportDebug core:barcode:koverXmlReportFdroidDebug core:barcode:koverXmlReportGoogleDebug mesh_service_example:koverXmlReportDebug -Pci=true --continue --scan
|
||||
run: ./gradlew test koverXmlReport app:koverXmlReportFdroidDebug app:koverXmlReportGoogleDebug core:api:koverXmlReportDebug core:barcode:koverXmlReportFdroidDebug core:barcode:koverXmlReportGoogleDebug mesh_service_example:koverXmlReportDebug desktop:koverXmlReport -Pci=true --continue --scan
|
||||
|
||||
- name: KMP JVM Smoke Compile
|
||||
run: ./gradlew :core:proto:compileKotlinJvm :core:common:compileKotlinJvm :core:model:compileKotlinJvm :core:repository:compileKotlinJvm :core:di:compileKotlinJvm :core:navigation:compileKotlinJvm :core:resources:compileKotlinJvm :core:datastore:compileKotlinJvm :core:database:compileKotlinJvm :core:domain:compileKotlinJvm :core:prefs:compileKotlinJvm :core:network:compileKotlinJvm :core:data:compileKotlinJvm :core:ble:compileKotlinJvm :core:nfc:compileKotlinJvm :core:service:compileKotlinJvm :core:testing:compileKotlinJvm :core:ui:compileKotlinJvm :feature:intro:compileKotlinJvm :feature:messaging:compileKotlinJvm :feature:connections:compileKotlinJvm :feature:map:compileKotlinJvm :feature:node:compileKotlinJvm :feature:settings:compileKotlinJvm :feature:firmware:compileKotlinJvm -Pci=true --continue --scan
|
||||
|
||||
70
codecov.yml
70
codecov.yml
@@ -1,3 +1,71 @@
|
||||
# Codecov configuration for Meshtastic Android
|
||||
# Ref: https://docs.codecov.com/docs/codecovyml-reference
|
||||
|
||||
codecov:
|
||||
branch: main
|
||||
|
||||
coverage:
|
||||
precision: 2
|
||||
round: down
|
||||
range: "70...100"
|
||||
status:
|
||||
patch: off
|
||||
project:
|
||||
default:
|
||||
target: auto # Coverage should not decrease from base branch
|
||||
threshold: 1% # Allow 1% drop to reduce noise
|
||||
patch:
|
||||
default:
|
||||
target: auto # New code should have coverage similar to project average
|
||||
threshold: 1%
|
||||
base: auto
|
||||
|
||||
comment:
|
||||
layout: "reach,diff,flags,files"
|
||||
behavior: default
|
||||
require_changes: false # Post a comment even if coverage doesn't change
|
||||
|
||||
flags:
|
||||
host-unit:
|
||||
paths:
|
||||
- .
|
||||
carryforward: true
|
||||
android-instrumented:
|
||||
paths:
|
||||
- .
|
||||
carryforward: true
|
||||
|
||||
component_management:
|
||||
default_rules:
|
||||
statuses:
|
||||
- type: project
|
||||
target: auto
|
||||
threshold: 1%
|
||||
individual_components:
|
||||
- name: Core
|
||||
paths:
|
||||
- core/**
|
||||
- name: Features
|
||||
paths:
|
||||
- feature/**
|
||||
- name: App
|
||||
paths:
|
||||
- app/**
|
||||
- name: Desktop
|
||||
paths:
|
||||
- desktop/**
|
||||
- name: Example
|
||||
paths:
|
||||
- mesh_service_example/**
|
||||
|
||||
ignore:
|
||||
- "**/build/**"
|
||||
- "**/*.pb.kt" # Generated Protobuf code
|
||||
- "**/*.aidl" # AIDL interface files
|
||||
- "**/aidl/**" # Generated AIDL code
|
||||
- "core/resources/**" # Centralized resources
|
||||
- "**/test/**" # Unit tests
|
||||
- "**/androidTest/**" # Instrumented tests
|
||||
- "**/*Test.kt" # Test files
|
||||
- "**/*Mock.kt" # Fakes/Mocks
|
||||
- "**/*Fake.kt" # Fakes
|
||||
- "**/testing/**" # Shared test utilities
|
||||
|
||||
@@ -28,6 +28,7 @@ plugins {
|
||||
alias(libs.plugins.meshtastic.detekt)
|
||||
alias(libs.plugins.meshtastic.spotless)
|
||||
alias(libs.plugins.meshtastic.koin)
|
||||
id("meshtastic.kover")
|
||||
alias(libs.plugins.aboutlibraries)
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ Current reusable check workflow includes:
|
||||
- Android lint for all directly runnable Android modules:
|
||||
`app:lintFdroidDebug app:lintGoogleDebug core:barcode:lintFdroidDebug core:barcode:lintGoogleDebug core:api:lintDebug mesh_service_example:lintDebug`
|
||||
- Host tests plus coverage aggregation:
|
||||
`test koverXmlReport app:koverXmlReportFdroidDebug app:koverXmlReportGoogleDebug core:api:koverXmlReportDebug core:barcode:koverXmlReportFdroidDebug core:barcode:koverXmlReportGoogleDebug mesh_service_example:koverXmlReportDebug`
|
||||
`test koverXmlReport app:koverXmlReportFdroidDebug app:koverXmlReportGoogleDebug core:api:koverXmlReportDebug core:barcode:koverXmlReportFdroidDebug core:barcode:koverXmlReportGoogleDebug mesh_service_example:koverXmlReportDebug desktop:koverXmlReport`
|
||||
- JVM smoke compile for all KMP JVM targets (all compile-only modules remain explicit):
|
||||
`:core:proto:compileKotlinJvm :core:common:compileKotlinJvm :core:model:compileKotlinJvm :core:repository:compileKotlinJvm :core:di:compileKotlinJvm :core:navigation:compileKotlinJvm :core:resources:compileKotlinJvm :core:datastore:compileKotlinJvm :core:database:compileKotlinJvm :core:domain:compileKotlinJvm :core:prefs:compileKotlinJvm :core:network:compileKotlinJvm :core:data:compileKotlinJvm :core:ble:compileKotlinJvm :core:nfc:compileKotlinJvm :core:service:compileKotlinJvm :core:testing:compileKotlinJvm :core:ui:compileKotlinJvm :feature:intro:compileKotlinJvm :feature:messaging:compileKotlinJvm :feature:connections:compileKotlinJvm :feature:map:compileKotlinJvm :feature:node:compileKotlinJvm :feature:settings:compileKotlinJvm :feature:firmware:compileKotlinJvm`
|
||||
- Android build tasks:
|
||||
|
||||
Reference in New Issue
Block a user