Skip to content

Commit

Permalink
Badges & Tests (#25)
Browse files Browse the repository at this point in the history
* Changed badges for img.shields.io

* Updated github workflow

* Added missing actions php version

* Changed licence badge for img.shields.io
  • Loading branch information
yann-eugone authored Nov 11, 2020
1 parent fe371dc commit 0897dd9
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 55 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/ci.yml

This file was deleted.

103 changes: 103 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: "Tests"

on:
pull_request: null
push:
branches:
- "0.*.x"

jobs:
phpunit:
name: "PHPUnit"
runs-on: ubuntu-latest

strategy:
matrix:
include:
- php-version: 7.1
symfony-version: 4.4.*
- php-version: 7.4
symfony-version: 4.4.*
- php-version: 7.2
symfony-version: 5.1.*
- php-version: 7.4
symfony-version: 5.1.*

steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}

- name: "Install dependencies with composer"
run: |
composer require --no-update symfony/workflow:${{ matrix.symfony-version }}
composer update --no-interaction --no-progress --no-suggest
- name: "Run tests with phpunit/phpunit"
run: vendor/bin/phpunit

checkstyke:
name: "Checkstyle"
runs-on: ubuntu-latest

strategy:
matrix:
include:
- php-version: 7.4
symfony-version: 5.1.*

steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
coverage: none
php-version: ${{ matrix.php-version }}

- name: "Install dependencies with composer"
run: |
composer update --no-interaction --no-progress --no-suggest
- name: "Run checkstyle with squizlabs/php_codesniffer"
run: vendor/bin/phpcs

codecov:
name: "Code coverage"
runs-on: ubuntu-latest

strategy:
matrix:
include:
- php-version: 7.4
symfony-version: 5.1.*

steps:
- name: "Checkout"
uses: actions/[email protected]

- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
coverage: xdebug
php-version: ${{ matrix.php-version }}

- name: "Install dependencies with composer"
run: |
composer require --no-update symfony/workflow:${{ matrix.symfony-version }}
composer update --no-interaction --no-progress --no-suggest
- name: "Run tests with phpunit/phpunit"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
vendor/bin/phpunit --coverage-clover coverage.xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v1
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
Yokai Sonata Workflow
=====================

[![Latest Stable Version](https://poser.pugx.org/yokai/sonata-workflow/v/stable)](https://packagist.org/packages/yokai/sonata-workflow)
[![Latest Unstable Version](https://poser.pugx.org/yokai/sonata-workflow/v/unstable)](https://packagist.org/packages/yokai/sonata-workflow)
[![Total Downloads](https://poser.pugx.org/yokai/sonata-workflow/downloads)](https://packagist.org/packages/yokai/sonata-workflow)
[![License](https://poser.pugx.org/yokai/sonata-workflow/license)](https://packagist.org/packages/yokai/sonata-workflow)
[![Tests](https://img.shields.io/github/workflow/status/yokai-php/sonata-workflow/Tests?style=flat-square&label=tests)](https://github.com/yokai-php/sonata-workflow/actions)
[![Coverage](https://img.shields.io/codecov/c/github/yokai-php/sonata-workflow?style=flat-square)](https://codecov.io/gh/yokai-php/sonata-workflow)
[![Contributors](https://img.shields.io/github/contributors/yokai-php/sonata-workflow?style=flat-square)](https://github.com/yokai-php/sonata-workflow/graphs/contributors)

[![License](https://img.shields.io/packagist/l/yokai/sonata-workflow?style=flat-square)](https://packagist.org/packages/yokai/sonata-workflow/stats)
[![Latest Stable Version](https://img.shields.io/packagist/v/yokai/sonata-workflow?style=flat-square)](https://packagist.org/packages/yokai/sonata-workflow)
[![Current Unstable Version](https://img.shields.io/packagist/v/yokai/sonata-workflow?include_prereleases&style=flat-square)](https://packagist.org/packages/yokai/sonata-workflow)
[![Downloads Monthly](https://img.shields.io/packagist/dm/yokai/sonata-workflow?style=flat-square)](https://packagist.org/packages/yokai/sonata-workflow/stats)
[![Total Downloads](https://img.shields.io/packagist/dt/yokai/sonata-workflow?style=flat-square)](https://packagist.org/packages/yokai/sonata-workflow/stats)


Introduction
Expand Down

0 comments on commit 0897dd9

Please sign in to comment.