From 7773fcd0e08b06eb6609503fb8d75b1f6d954b2f Mon Sep 17 00:00:00 2001 From: Leandro Colmenarez <89696212+LeandroLCD@users.noreply.github.com> Date: Sun, 14 Dec 2025 23:27:59 -0300 Subject: [PATCH 1/3] Feat: Add CI configuration for Android with unit testing --- .circleci/config.yml | 64 -------------------------------- .github/workflows/android-ci.yml | 37 ++++++++++++++++++ 2 files changed, 37 insertions(+), 64 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/android-ci.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 37271b0..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,64 +0,0 @@ -# CircleCI configuration for Android Unit Tests with JaCoCo -version: 2.1 - -orbs: - android: circleci/android@3.1.0 - -jobs: - unit-test: - executor: - name: android/android-docker - tag: 2024.11.1 - - steps: - - checkout - - # Asegurar runnable gradlew - - run: - name: Grant execute permission for Gradle wrapper - command: chmod +x ./gradlew - - - android/restore_gradle_cache - - # ------------------------- - # Ejecutar tests unitarios y generar reporte de cobertura - # ------------------------- - - run: - name: Run Unit Tests and Generate JaCoCo Report - command: ./gradlew test jacocoTestReport --no-daemon --stacktrace - - - android/save_gradle_cache - - # Recopilar resultados de las pruebas (JUnit XML) - - run: - name: Collect Test Results - command: | - mkdir -p ~/test-results/junit/ - # Copia todos los archivos XML de resultados de test - find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/junit/ \; - when: always - - - store_test_results: - path: ~/test-results - - - store_artifacts: - path: ~/test-results/junit - destination: junit-results - - - store_artifacts: - path: app/build/reports/jacoco - destination: jacoco-report-app - - - store_artifacts: - path: Library/build/reports/jacoco - destination: jacoco-report-library - -workflows: - test-and-coverage: - jobs: - - unit-test: - name: unit-test - filters: - branches: - only: - - master diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml new file mode 100644 index 0000000..d735bd9 --- /dev/null +++ b/.github/workflows/android-ci.yml @@ -0,0 +1,37 @@ +name: Android CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-and-test: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + + - name: Grant execute permission for Gradle wrapper + run: chmod +x ./gradlew + + - name: Run Unit Tests + run: ./gradlew test --no-daemon --stacktrace + + - name: Upload Unit Test Results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: unit-test-results + path: '**/build/test-results/testDebugUnitTest/*.xml' + + + From de99e2e62a8de3f3870290a1529ae5986378df72 Mon Sep 17 00:00:00 2001 From: Leandro Colmenarez <89696212+LeandroLCD@users.noreply.github.com> Date: Sun, 14 Dec 2025 23:28:28 -0300 Subject: [PATCH 2/3] Feat: Add CI configuration for Android with unit testing --- .github/workflows/android-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index d735bd9..d381258 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -2,7 +2,7 @@ name: Android CI on: push: - branches: [ master ] + branches: [ master, develop ] pull_request: branches: [ master ] From a9e9dfe2279792e1339ea31bd6af27e7830c688b Mon Sep 17 00:00:00 2001 From: Leandro Colmenarez <89696212+LeandroLCD@users.noreply.github.com> Date: Sun, 14 Dec 2025 23:34:20 -0300 Subject: [PATCH 3/3] CI: Trigger workflow only on relevant path changes Updates the `android-ci.yml` workflow to trigger only when changes are made to the `Library/` or `.github/workflows/` directories. This applies to both `push` and `pull_request` events. --- .github/workflows/android-ci.yml | 6 ++++++ README.md | 5 ++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index d381258..a4d87a9 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -3,8 +3,14 @@ name: Android CI on: push: branches: [ master, develop ] + paths: + - 'Library/**' + - '.github/workflows/**' pull_request: branches: [ master ] + paths: + - 'Library/**' + - '.github/workflows/**' jobs: build-and-test: diff --git a/README.md b/README.md index 38058c9..01d273e 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,11 @@ ![GitHub release (latest by date)](https://img.shields.io/github/v/release/LeandroLCD/DateTime) ![GitHub last commit](https://img.shields.io/github/last-commit/LeandroLCD/DateTime) ![GitHub issues](https://img.shields.io/github/issues/LeandroLCD/DateTime) -![Tests](https://img.shields.io/badge/tests-passing-brightgreen) -[![CircleCI](https://dl.circleci.com/status-badge/img/gh/LeandroLCD/DateTime/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/LeandroLCD/DateTime/tree/master) +![![Android CI-CD](https://github.com/LeandroLCD/DateTime/actions/workflows/android-ci.yml/badge.svg)](https://github.com/LeandroLCD/DateTime/actions/workflows/android-ci.yml) -Una librería ligera para trabajar con fechas y tiempos en **Android**, construida sobre [ThreeTenABP](https://github.com/JakeWharton/ThreeTenABP). +Una librería ligera para trabajar con fechas y tiempos en **Android**. Proporciona una API sencilla para manipular, formatear y comparar fechas de manera segura. ## 🚀 Instalación