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 a20281d commit d664780
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 24 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/php.yml
Expand Up @@ -76,3 +76,36 @@ jobs:

- name: Run type coverage
run: composer run-script psalm

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 MySQL
run: ./.github/run-mysql.sh

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

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
@@ -1,7 +1,6 @@
# Prime Events
[![build](https://github.com/b2pweb/bdf-prime-events/actions/workflows/php.yml/badge.svg)](https://github.com/b2pweb/bdf-prime-events/actions/workflows/php.yml)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/b2pweb/bdf-prime-events/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/b2pweb/bdf-prime-events/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/b2pweb/bdf-prime-events/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/b2pweb/bdf-prime-events/?branch=master)
[![codecov](https://codecov.io/github/b2pweb/bdf-prime-events/branch/2.0/graph/badge.svg?token=VOFSPEWYKX)](https://app.codecov.io/github/b2pweb/bdf-prime-events)
[![Packagist Version](https://img.shields.io/packagist/v/b2pweb/bdf-prime-events.svg)](https://packagist.org/packages/b2pweb/bdf-prime-events)
[![Total Downloads](https://img.shields.io/packagist/dt/b2pweb/bdf-prime-events.svg)](https://packagist.org/packages/b2pweb/bdf-prime-events)
[![Type Coverage](https://shepherd.dev/github/b2pweb/bdf-prime-events/coverage.svg)](https://shepherd.dev/github/b2pweb/bdf-prime-events)
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 d664780

Please sign in to comment.