Skip to content

Commit

Permalink
added Code Climate Test Coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
artengin committed Jul 2, 2024
1 parent 840a844 commit dd9c3e5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: genDiff
name: Tests
on: push
jobs:
build:
Expand All @@ -7,4 +7,12 @@ jobs:
- uses: actions/checkout@v3
- run: make install
- run: make test
- run: make lint
- run: make lint
- name: Code Climate Test Coverage
uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageCommand: make test-coverage
coverageLocations: ${{github.workplace}}/build/logs/clover.xml:clover
debug: true
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ lint:
composer exec --verbose phpcs -- --standard=PSR12 src bin

test:
composer exec --verbose phpunit tests
composer exec --verbose phpunit tests

test-coverage:
composer exec --verbose phpunit tests -- --coverage-clover build/logs/clover.xml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
[![Actions Status](https://github.com/artengin/php-project-48/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/artengin/php-project-48/actions)

### Github Actions and code Climate:
[![Actions Status](https://github.com/artengin/php-project-48/actions/workflows/test.yml/badge.svg)](https://github.com/artengin/php-project-48/actions) [![Maintainability](https://api.codeclimate.com/v1/badges/debcd3dc6422436345f5/maintainability)](https://codeclimate.com/github/artengin/php-project-48/maintainability)
[![Actions Status](https://github.com/artengin/php-project-48/actions/workflows/test.yml/badge.svg)](https://github.com/artengin/php-project-48/actions) [![Maintainability](https://api.codeclimate.com/v1/badges/debcd3dc6422436345f5/maintainability)](https://codeclimate.com/github/artengin/php-project-48/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/debcd3dc6422436345f5/test_coverage)](https://codeclimate.com/github/artengin/php-project-48/test_coverage)

0 comments on commit dd9c3e5

Please sign in to comment.