From 46d201599d37e76da74699942a87923cc47fa357 Mon Sep 17 00:00:00 2001 From: ShoheiTai Date: Sun, 9 Jun 2024 15:22:13 +0900 Subject: [PATCH 1/3] Add coverall --- .github/workflows/code_check.yml | 15 +++++++++++++-- README.md | 2 ++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code_check.yml b/.github/workflows/code_check.yml index 291e6ea..021d9ef 100644 --- a/.github/workflows/code_check.yml +++ b/.github/workflows/code_check.yml @@ -41,8 +41,19 @@ jobs: - name: Install dependencies run: composer install --prefer-dist --no-progress --no-suggest - - name: Run PHPUnit - run: vendor/bin/phpunit + - name: Run PHPUnit with coverage + run: | + mkdir -p build/logs + vendor/bin/phpunit --coverage-clover build/logs/clover.xml --coverage-text + + - name: Upload coverage to Coveralls + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-clover: build/logs/clover.xml + parallel: true + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} phpmd: runs-on: ubuntu-latest diff --git a/README.md b/README.md index bb0ef22..7498b29 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![Latest Stable Version](https://poser.pugx.org/tai-sho/oura-api-php/v/stable)](https://packagist.org/packages/tai-sho/oura-api-php) [![Build Status](https://github.com/tai-sho/oura-api-php/actions/workflows/code_check.yml/badge.svg)](https://github.com/tai-sho/oura-api-php/actions/workflows/code_check.yml) [![License](https://poser.pugx.org/tai-sho/oura-api-php/license)](https://packagist.org/packages/tai-sho/oura-api-php) +[![Coverage Status](https://coveralls.io/repos/github/tai-sho/oura-api-php/badge.svg?branch=main)](https://coveralls.io/github/tai-sho/oura-api-php?branch=main) +[![PHP Version](https://img.shields.io/badge/php-%3E%3D7.4-blue)](https://packagist.org/packages/tai-sho/oura-api-php) [![Twitter Follow](https://img.shields.io/twitter/follow/tai-sho.svg?style=social&label=Follow)](https://twitter.com/tai-sho) A PHP client library for the Oura Ring API. From fce32cdf4ff94d210bb5b33987ad26c8c2608cf2 Mon Sep 17 00:00:00 2001 From: ShoheiTai Date: Sun, 9 Jun 2024 15:31:07 +0900 Subject: [PATCH 2/3] Fix actions --- .github/workflows/code_check.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/code_check.yml b/.github/workflows/code_check.yml index 021d9ef..ec13c84 100644 --- a/.github/workflows/code_check.yml +++ b/.github/workflows/code_check.yml @@ -51,7 +51,6 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-clover: build/logs/clover.xml - parallel: true env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} From cbbfc837645f122e17d93ec8dd0ff8b11b656b56 Mon Sep 17 00:00:00 2001 From: ShoheiTai Date: Sun, 9 Jun 2024 15:49:05 +0900 Subject: [PATCH 3/3] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7498b29..055c82e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # oura-api-php [![Latest Stable Version](https://poser.pugx.org/tai-sho/oura-api-php/v/stable)](https://packagist.org/packages/tai-sho/oura-api-php) [![Build Status](https://github.com/tai-sho/oura-api-php/actions/workflows/code_check.yml/badge.svg)](https://github.com/tai-sho/oura-api-php/actions/workflows/code_check.yml) -[![License](https://poser.pugx.org/tai-sho/oura-api-php/license)](https://packagist.org/packages/tai-sho/oura-api-php) [![Coverage Status](https://coveralls.io/repos/github/tai-sho/oura-api-php/badge.svg?branch=main)](https://coveralls.io/github/tai-sho/oura-api-php?branch=main) [![PHP Version](https://img.shields.io/badge/php-%3E%3D7.4-blue)](https://packagist.org/packages/tai-sho/oura-api-php) +[![License](https://poser.pugx.org/tai-sho/oura-api-php/license)](https://packagist.org/packages/tai-sho/oura-api-php) [![Twitter Follow](https://img.shields.io/twitter/follow/tai-sho.svg?style=social&label=Follow)](https://twitter.com/tai-sho) A PHP client library for the Oura Ring API.