From 86433a9433f0ec8111c916cef575fe6adebb273b Mon Sep 17 00:00:00 2001 From: Tac Tacelosky Date: Mon, 8 Nov 2021 06:58:03 -0500 Subject: [PATCH] show workflow badges --- .github/workflows/ci.yml | 15 +++++++++++---- .github/workflows/php.yml | 4 ++-- README.markdown | 3 +++ composer.json | 6 ++++++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95a28e3..ed5c28c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,8 +7,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: php-actions/composer@v5 # or alternative dependency management - - uses: php-actions/phpunit@v9 - # ... then your own project steps ... + - uses: actions/checkout@v2 + - uses: php-actions/composer@v5 + + - name: PHPUnit Tests + uses: php-actions/phpunit@v2 + env: + TEST_NAME: PHPUNIT + with: + bootstrap: vendor/autoload.php + configuration: phpunit.xml + args: --coverage-text diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 65254b6..066ac59 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -32,5 +32,5 @@ jobs: # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit" # Docs: https://getcomposer.org/doc/articles/scripts.md - # - name: Run test suite - # run: composer run-script test + - name: Run test suite + run: composer run-script test diff --git a/README.markdown b/README.markdown index 715d6ad..398d3a7 100644 --- a/README.markdown +++ b/README.markdown @@ -2,6 +2,9 @@ Provide markdown conversion (based on [Michel Fortin work](https://github.com/mi [![Build Status](https://secure.travis-ci.org/KnpLabs/KnpMarkdownBundle.svg)](http://travis-ci.org/KnpLabs/KnpMarkdownBundle) +![ci.yml](https://github.com/tacman/KnpMarkdownBundle/actions/workflows/ci.yml/badge.svg) +![php.yml](https://github.com/tacman/KnpMarkdownBundle/actions/workflows/php.yml/badge.svg) + ## INSTALLATION Add KnpMarkdownBundle to your project via [Composer](https://getcomposer.org/): diff --git a/composer.json b/composer.json index fd53e00..a071716 100644 --- a/composer.json +++ b/composer.json @@ -38,6 +38,12 @@ } }, + "scripts": { + "test": [ + "php ./vendor/bin/phpunit" + ] + }, + "autoload-dev": { "psr-4": { "Knp\\Bundle\\MarkdownBundle\\Tests\\": "tests/"