diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 776dfda..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Continuous Integration - -on: - pull_request: null - push: - branches: - - "0.x" - -jobs: - tests: - name: "Tests" - 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.0.0 - - - name: "Install dependencies with composer" - run: | - composer require --no-update --dev symfony/workflow:${{ matrix.symfony-version }} - composer update --no-interaction --no-progress --no-suggest - - - name: "Run tests with phpunit/phpunit" - run: vendor/bin/phpunit --coverage-text - - checkstyke: - name: "Checkstyle" - runs-on: ubuntu-latest - - steps: - - name: "Checkout" - uses: actions/checkout@v2.0.0 - - - 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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..34cf06b --- /dev/null +++ b/.github/workflows/tests.yml @@ -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/checkout@v2.0.0 + + - 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 diff --git a/README.md b/README.md index bc33259..6494aa9 100644 --- a/README.md +++ b/README.md @@ -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