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 4aa50ed commit 3d84165
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 14 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/php.yml
Expand Up @@ -104,3 +104,33 @@ jobs:

- name: Roave BC Check
run: docker run --rm -v `pwd`:/app nyholm/roave-bc-check --format=github-actions || true

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: 7.4
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
12 changes: 0 additions & 12 deletions .scrutinizer.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Expand Up @@ -3,8 +3,7 @@
Implementation of commons collections, with java-like stream to apply transformations.

[![build](https://github.com/b2pweb/bdf-collections/actions/workflows/php.yml/badge.svg)](https://github.com/b2pweb/bdf-collections/actions/workflows/php.yml)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/b2pweb/bdf-collections/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/b2pweb/bdf-collections/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/b2pweb/bdf-collections/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/b2pweb/bdf-collections/?branch=master)
[![codecov](https://codecov.io/github/b2pweb/bdf-collections/branch/master/graph/badge.svg?token=VOFSPEWYKX)](https://app.codecov.io/github/b2pweb/bdf-collections)
[![Packagist Version](https://img.shields.io/packagist/v/b2pweb/bdf-collections.svg)](https://packagist.org/packages/b2pweb/bdf-collections)
[![Total Downloads](https://img.shields.io/packagist/dt/b2pweb/bdf-collections.svg)](https://packagist.org/packages/b2pweb/bdf-collections)
[![Type Coverage](https://shepherd.dev/github/b2pweb/bdf-collections/coverage.svg)](https://shepherd.dev/github/b2pweb/bdf-collections)
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: 99%

0 comments on commit 3d84165

Please sign in to comment.