Add code coverage and update readme badges

This commit is contained in:
Jérémy Munsch 2021-09-11 12:56:21 +02:00
parent c80000e2fd
commit 402609ad07
No known key found for this signature in database
GPG key ID: 677E1F9F80C16560
6 changed files with 15 additions and 9 deletions

View file

@ -14,12 +14,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
tools: cs2pr, phpcs
tools: phpcs
- name: Validate composer.json and composer.lock
run: composer validate --strict

2
.gitignore vendored
View file

@ -1,4 +1,6 @@
workspace.code-workspace
vendor
.phpunit.result.cache
.phpunit.cache
.vscode/launch.json
build

View file

@ -18,7 +18,8 @@
"phpunit/phpunit": "~9.0",
"squizlabs/php_codesniffer": "^3.5",
"orchestra/testbench": "^6.13",
"slevomat/coding-standard": "^7.0"
"slevomat/coding-standard": "^7.0",
"phpunit/php-code-coverage": "^9.2"
},
"autoload": {
"psr-4": {

2
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "7c1c3e18e9a6cb3970b2030450b645d7",
"content-hash": "029a6d7114230ecf511d861a90424ec0",
"packages": [],
"packages-dev": [
{

View file

@ -1,9 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" backupStaticAttributes="false" colors="true" verbose="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<coverage cacheDirectory=".phpunit.cache/code-coverage" processUncoveredFiles="true">
<include>
<directory>src/</directory>
<directory suffix=".php">src/</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
</report>
</coverage>
<testsuites>
<testsuite name="Package">

View file

@ -1,9 +1,8 @@
# Enum
![GitHub](https://img.shields.io/github/license/Kwaadpepper/enum?style=flat-square)
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Total Downloads][ico-downloads]][link-downloads]
[![Build Status][ico-travis]][link-travis]
[![StyleCI][ico-styleci]][link-styleci]
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Kwaadpepper/enum/PHP%20Composer?style=flat-square)
This is where your description should go. Take a look at [contributing.md](contributing.md) to see a to do list.