From 02f5e2781faadcbedf12fd23510c019b2a3bcb62 Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Sun, 4 Aug 2024 16:02:39 +0200 Subject: [PATCH 1/4] Add code coverage for target --- project.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project.yml b/project.yml index 1fcfdd31..3ddf49a6 100644 --- a/project.yml +++ b/project.yml @@ -131,5 +131,7 @@ schemes: - UnitTests commandLineArguments: testing: true - + gatherCoverageData: true + coverageTargets: + - Kiwix \ No newline at end of file From 6d3f0da734d3374a8351c1a5ee2d3e3dcd5d1ac6 Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Sun, 4 Aug 2024 16:15:38 +0200 Subject: [PATCH 2/4] Add codecov badge to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c9833f13..0a0dae7e 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ This is the home for Kiwix apps for Apple iOS and macOS. [![CodeFactor](https://www.codefactor.io/repository/github/kiwix/kiwix-apple/badge)](https://www.codefactor.io/repository/github/kiwix/kiwix-apple) [![CI Build Status](https://github.com/kiwix/kiwix-apple/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/kiwix/kiwix-apple/actions/workflows/ci.yml?query=branch%3Amain) [![CD Build Status](https://github.com/kiwix/kiwix-apple/actions/workflows/cd.yml/badge.svg?branch=main)](https://github.com/kiwix/kiwix-apple/actions/workflows/cd?query=branch%3Amain) +[![Codecov](https://codecov.io/gh/kiwix/kiwix-apple/branch/main/graph/badge.svg)](https://codecov.io/gh/kiwix/kiwix-apple) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) Drawing= From ffc68c4ca8319d6c499252cef652b205bcf8dad0 Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Sun, 4 Aug 2024 16:16:21 +0200 Subject: [PATCH 3/4] Add codeCov to CI step --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41a7ff91..57fed860 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,3 +59,8 @@ jobs: if: matrix.platform == 'macOS' run: xcodebuild test -scheme Kiwix -destination 'platform=macOS' + - name: Upload coverage reports to Codecov with GitHub Action + uses: codecov/codecov-action@v4.2.0 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + From 3005f0a6a8e687029f4160a561e2cca067949e05 Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Sun, 4 Aug 2024 16:48:27 +0200 Subject: [PATCH 4/4] Rename action --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57fed860..33fd0005 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: APPLE_DEVELOPMENT_SIGNING_CERTIFICATE: ${{ secrets.APPLE_DEVELOPMENT_SIGNING_CERTIFICATE }} APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD: ${{ secrets.APPLE_DEVELOPMENT_SIGNING_P12_PASSWORD }} EXTRA_XCODEBUILD: ${{ env.EXTRA_XCODEBUILD }} - + - name: Run Unit Tests on iOS if: matrix.platform == 'iOS' run: xcodebuild test -scheme Kiwix -destination 'platform=iOS Simulator,name=iPhone 15 Plus' @@ -59,7 +59,7 @@ jobs: if: matrix.platform == 'macOS' run: xcodebuild test -scheme Kiwix -destination 'platform=macOS' - - name: Upload coverage reports to Codecov with GitHub Action + - name: Upload code coverage uses: codecov/codecov-action@v4.2.0 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}