Skip to content

Feature/ci pipeline#55

Open
gaurigupta0604 wants to merge 6 commits into
A-Akhil:mainfrom
gaurigupta0604:feature/ci-pipeline
Open

Feature/ci pipeline#55
gaurigupta0604 wants to merge 6 commits into
A-Akhil:mainfrom
gaurigupta0604:feature/ci-pipeline

Conversation

@gaurigupta0604

Copy link
Copy Markdown

This PR adds a CI pipeline using GitHub Actions for the Android project. The goal is to automate the build and testing process so that it runs on every PR and push to main.

What's been added:

  • Gradle build (assembleDebug)
  • Unit testing (testDebugUnitTest)
  • Code coverage reports using JaCoCo
  • Linting with Detekt
  • Uploading reports as artifacts

Let me know if there's anything I missed or should change. :)

@A-Akhil A-Akhil requested a review from Copilot August 4, 2025 05:24

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive CI pipeline using GitHub Actions for automated Android project builds and testing on every PR and push to main. The implementation includes code quality tools and coverage reporting to ensure consistent code standards.

  • Added GitHub Actions workflows with build automation, unit testing, and code coverage using JaCoCo
  • Configured Detekt for Kotlin code linting and quality checks
  • Updated Gradle dependencies and plugin configurations to support the CI pipeline

Reviewed Changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
.github/workflows/ci.yml Comprehensive CI workflow with build, test, coverage, and linting steps
.github/workflows/android.yml Basic Android build workflow
app/build.gradle.kts Added JaCoCo plugin and coverage reporting configuration
settings.gradle.kts Reordered repository declarations for better resolution
gradle.properties Removed hardcoded JDK path for better CI compatibility

Comment thread .github/workflows/ci.yml
pull_request:
branches: [ main ]
push:
branches: [ main, feature/ci-pipeline ]

Copilot AI Aug 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature branch 'feature/ci-pipeline' should not be included in the push trigger for production CI. This should only include stable branches like 'main'.

Suggested change
branches: [ main, feature/ci-pipeline ]
branches: [ main ]

Copilot uses AI. Check for mistakes.
Comment on lines +16 to +19
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3

Copilot AI Aug 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow uses outdated action versions (checkout@v3, setup-java@v3) while ci.yml uses newer versions (v4). Consider updating to match the newer workflow or removing this duplicate workflow entirely.

Suggested change
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
Comment on lines +46 to +54
- name: Run Detekt (Kotlin Linter)
run: ./gradlew detekt

- name: Upload Detekt Report
if: always()
uses: actions/upload-artifact@v4
with:
name: detekt-report
path: build/reports/detekt

Copilot AI Aug 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The detekt task is being executed without the detekt plugin being configured in the build.gradle.kts file. This will cause the CI to fail as the task doesn't exist.

Suggested change
- name: Run Detekt (Kotlin Linter)
run: ./gradlew detekt
- name: Upload Detekt Report
if: always()
uses: actions/upload-artifact@v4
with:
name: detekt-report
path: build/reports/detekt
# Detekt steps removed because the Detekt plugin is not configured in build.gradle.kts.

Copilot uses AI. Check for mistakes.
Comment thread app/build.gradle.kts
Comment on lines +140 to +150
val debugTree = fileTree("${buildDir}/intermediates/javac/debug/classes") {
exclude(fileFilter)
}

val kotlinDebugTree = fileTree("${buildDir}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}

classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(buildDir) {

Copilot AI Aug 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using deprecated 'buildDir' property. Should use 'layout.buildDirectory.get().asFile' instead for Gradle 7+ compatibility.

Suggested change
val debugTree = fileTree("${buildDir}/intermediates/javac/debug/classes") {
exclude(fileFilter)
}
val kotlinDebugTree = fileTree("${buildDir}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}
classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(buildDir) {
val debugTree = fileTree(layout.buildDirectory.get().asFile.resolve("intermediates/javac/debug/classes")) {
exclude(fileFilter)
}
val kotlinDebugTree = fileTree(layout.buildDirectory.get().asFile.resolve("tmp/kotlin-classes/debug")) {
exclude(fileFilter)
}
classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(layout.buildDirectory.get().asFile) {

Copilot uses AI. Check for mistakes.
Comment thread app/build.gradle.kts
Comment on lines +140 to +150
val debugTree = fileTree("${buildDir}/intermediates/javac/debug/classes") {
exclude(fileFilter)
}

val kotlinDebugTree = fileTree("${buildDir}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}

classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(buildDir) {

Copilot AI Aug 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using deprecated 'buildDir' property. Should use 'layout.buildDirectory.get().asFile' instead for Gradle 7+ compatibility.

Suggested change
val debugTree = fileTree("${buildDir}/intermediates/javac/debug/classes") {
exclude(fileFilter)
}
val kotlinDebugTree = fileTree("${buildDir}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}
classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(buildDir) {
val debugTree = fileTree("${layout.buildDirectory.get().asFile}/intermediates/javac/debug/classes") {
exclude(fileFilter)
}
val kotlinDebugTree = fileTree("${layout.buildDirectory.get().asFile}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}
classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(layout.buildDirectory.get().asFile) {

Copilot uses AI. Check for mistakes.
Comment thread app/build.gradle.kts
Comment on lines +140 to +150
val debugTree = fileTree("${buildDir}/intermediates/javac/debug/classes") {
exclude(fileFilter)
}

val kotlinDebugTree = fileTree("${buildDir}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}

classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(buildDir) {

Copilot AI Aug 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using deprecated 'buildDir' property. Should use 'layout.buildDirectory.get().asFile' instead for Gradle 7+ compatibility.

Suggested change
val debugTree = fileTree("${buildDir}/intermediates/javac/debug/classes") {
exclude(fileFilter)
}
val kotlinDebugTree = fileTree("${buildDir}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}
classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(buildDir) {
val debugTree = fileTree("${layout.buildDirectory.get().asFile}/intermediates/javac/debug/classes") {
exclude(fileFilter)
}
val kotlinDebugTree = fileTree("${layout.buildDirectory.get().asFile}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}
classDirectories.setFrom(files(debugTree, kotlinDebugTree))
sourceDirectories.setFrom(files("src/main/java", "src/main/kotlin"))
executionData.setFrom(fileTree(layout.buildDirectory.get().asFile) {

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
uses: actions/upload-artifact@v4
with:
name: detekt-report
path: build/reports/detekt

Copilot AI Aug 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The detekt reports path should likely be 'app/build/reports/detekt' to match the project structure, as detekt would run on the app module.

Suggested change
path: build/reports/detekt
path: app/build/reports/detekt

Copilot uses AI. Check for mistakes.
@A-Akhil

A-Akhil commented Aug 4, 2025

Copy link
Copy Markdown
Owner

@gaurigupta0604 kindly check into this suggestions by @copilot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants