Skip to content

Commit

Permalink
Merge pull request #2 from tai-sho/features/add-coverage
Browse files Browse the repository at this point in the history
Add coverall
  • Loading branch information
tai-sho authored Jun 9, 2024
2 parents bc4c459 + cbbfc83 commit d0c031c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/code_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,18 @@ 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
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

phpmd:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# 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)
[![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)

Expand Down

0 comments on commit d0c031c

Please sign in to comment.