Skip to content

Commit

Permalink
ci: Setup codecov (#FRAM-111)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent4vx committed Mar 14, 2023
1 parent ac07dff commit 61a8128
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 15 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/php.yml
Expand Up @@ -83,3 +83,33 @@ jobs:
run: |
git fetch --depth=1 origin $GITHUB_BASE_REF
./infection.phar --logger-github --git-diff-filter=AM
coverage:
name: Code Coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set Timezone
uses: szenius/set-timezone@v1.0
with:
timezoneLinux: "Europe/Paris"

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: json
ini-values: date.timezone=Europe/Paris

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test coverage
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage.xml
13 changes: 0 additions & 13 deletions .scrutinizer.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
@@ -1,7 +1,6 @@
# Prime Analyzer
[![build](https://github.com/b2pweb/bdf-prime-analyzer/actions/workflows/php.yml/badge.svg)](https://github.com/b2pweb/bdf-prime-analyzer/actions/workflows/php.yml)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/b2pweb/bdf-prime-analyzer/badges/quality-score.png?b=1.0)](https://scrutinizer-ci.com/g/b2pweb/bdf-prime-analyzer/?branch=1.0)
[![Code Coverage](https://scrutinizer-ci.com/g/b2pweb/bdf-prime-analyzer/badges/coverage.png?b=1.0)](https://scrutinizer-ci.com/g/b2pweb/bdf-prime-analyzer/?branch=1.0)
[![codecov](https://codecov.io/github/b2pweb/bdf-prime-analyzer/branch/2.0/graph/badge.svg?token=VOFSPEWYKX)](https://app.codecov.io/github/b2pweb/bdf-prime-analyzer)
[![Packagist Version](https://img.shields.io/packagist/v/b2pweb/bdf-prime-analyzer.svg)](https://packagist.org/packages/b2pweb/bdf-prime-analyzer)
[![Total Downloads](https://img.shields.io/packagist/dt/b2pweb/bdf-prime-analyzer.svg)](https://packagist.org/packages/b2pweb/bdf-prime-analyzer)
[![Type Coverage](https://shepherd.dev/github/b2pweb/bdf-prime-analyzer/coverage.svg)](https://shepherd.dev/github/b2pweb/bdf-prime-analyzer)
Expand Down
15 changes: 15 additions & 0 deletions codecov.yml
@@ -0,0 +1,15 @@
codecov:
require_ci_to_pass: false
notify:
wait_for_ci: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
# basic
target: 95%

0 comments on commit 61a8128

Please sign in to comment.