Skip to content

Commit

Permalink
dev: separate tests per PHP verion + review of README badges
Browse files Browse the repository at this point in the history
  • Loading branch information
e-picas committed Feb 4, 2024
1 parent 23984d7 commit a86a456
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 132 deletions.
131 changes: 0 additions & 131 deletions .github/workflows/test.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/test_php5.yml
@@ -0,0 +1,50 @@

name: "Test & lint PHP 5.6"
run-name: "[php 5.6] Run PHPUnit + Mess-Detector"

on:
push:

permissions:
contents: read # for checkout

jobs:

run_tests_php56:
name: "[php 5.6] tests & validation"
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}

- name: Setup PHP 5.6
uses: shivammathur/setup-php@v2
with:
php-version: '5.6'

- name: Install composer dependencies
uses: php-actions/composer@v6
with:
version: "2.2"
php_version: "5.6"

- name: Test the console
run: php ./bin/markdown-extended

- name: Run Mess-Detector
uses: php-actions/composer@v6
with:
version: "2.2"
php_version: "5.6"
command: run messdetector-with-baseline

- name: Run unit tests
run: php ./bin/phpunit --no-coverage --testdox
50 changes: 50 additions & 0 deletions .github/workflows/test_php7.yml
@@ -0,0 +1,50 @@

name: "Test & lint PHP 7.4"
run-name: "[php 7.4] Run PHPUnit + Mess-Detector + CS-Fixer"

on:
push:

permissions:
contents: read # for checkout

jobs:

run_tests_php74:
name: "[php 7.4] tests & validation"
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}

- name: Setup PHP 7.4
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Install composer dependencies
uses: php-actions/composer@v6

- name: Test the console
run: php ./bin/markdown-extended

- name: Run CS-Fixer
uses: php-actions/composer@v6
with:
command: run cs-fixer-ci

- name: Run Mess-Detector
uses: php-actions/composer@v6
with:
command: run messdetector-with-baseline

- name: Run unit tests
run: composer run test
53 changes: 53 additions & 0 deletions .github/workflows/test_php8.yml
@@ -0,0 +1,53 @@

name: "Test & lint PHP 8.3"
run-name: "[php 8.3] Run PHPUnit + Mess-Detector + CS-Fixer"

on:
push:

permissions:
contents: read # for checkout

jobs:

run_tests_php83:
name: "[php 8.3] tests & validation"
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}

- name: Setup PHP 8.3
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- name: Install composer dependencies
uses: php-actions/composer@v6
with:
php_version: "8.3"

- name: Test the console
run: php ./bin/markdown-extended

- name: Run CS-Fixer
uses: php-actions/composer@v6
with:
php_version: "8.3"
command: run cs-fixer-ci

- name: Run Mess-Detector
uses: php-actions/composer@v6
with:
command: run messdetector-with-baseline

- name: Run unit tests
run: composer run test
23 changes: 22 additions & 1 deletion README.md
Expand Up @@ -3,11 +3,32 @@ PHP Markdown Extended

Yet another PHP parser for the markdown (*extended*) syntax.

[![Community](https://img.shields.io/badge/Join%20the%20community-on%20GitHub%20Discussions-blue)](https://github.com/e-picas/markdown-extended/discussions)
[![License](http://poser.pugx.org/picas/markdown-extended/license)](https://packagist.org/packages/picas/markdown-extended)
[![PHP Version Require](http://poser.pugx.org/picas/markdown-extended/require/php)](https://packagist.org/packages/picas/markdown-extended)
[![Version](http://poser.pugx.org/picas/markdown-extended/version)](https://packagist.org/packages/picas/markdown-extended)
[![Last Release](https://img.shields.io/github/v/tag/e-picas/markdown-extended?sort=semver&label=last%20release)](https://github.com/e-picas/markdown-extended/releases)
[![Tests status](https://github.com/e-picas/markdown-extended/actions/workflows/test.yml/badge.svg?branch=develop-php7)](https://github.com/e-picas/markdown-extended/actions/workflows/test.yml)
[![Dependency Status](https://www.versioneye.com/user/projects/570e45aafcd19a00415b1287/badge.svg?style=flat)](http://www.versioneye.com/user/projects/570e45aafcd19a00415b1287)
[![Code Climate](https://codeclimate.com/github/e-picas/markdown-extended/badges/gpa.svg)](http://codeclimate.com/github/e-picas/markdown-extended)

[![Tests status PHP7](https://github.com/e-picas/markdown-extended/actions/workflows/test_php7.yml/badge.svg?branch=develop-php7)](https://github.com/e-picas/markdown-extended/actions/workflows/test_php7.yml)
[![Tests status PHP8](https://github.com/e-picas/markdown-extended/actions/workflows/test_php8.yml/badge.svg?branch=develop-php7)](https://github.com/e-picas/markdown-extended/actions/workflows/test_php8.yml)
[![Tests status PHP5](https://github.com/e-picas/markdown-extended/actions/workflows/test_php5.yml/badge.svg?branch=develop-php7)](https://github.com/e-picas/markdown-extended/actions/workflows/test_php5.yml)

[![PHP](https://img.shields.io/badge/PHP-5%2F7%2F8-e10079?logo=php)](https://www.php.net/)
[![Composer](https://img.shields.io/badge/Composer-grey?logo=composer)](https://getcomposer.org/)
[![Git Flow](https://img.shields.io/badge/GitFlow-grey?logo=git)](https://git-flow.readthedocs.io/en/latest/presentation.html)
[![Semantic Release](https://img.shields.io/badge/Semantic_Release-angular-e10079?logo=semantic-release)](https://semantic-release.gitbook.io/semantic-release/)
[![Docker](https://img.shields.io/badge/Docker-grey?logo=docker)](https://www.docker.com/)
[![GitHub actions](https://img.shields.io/badge/Github_Actions-grey?logo=github)](https://github.com/features/actions)
[![Conventional commits](https://img.shields.io/badge/Conventional_Commits-grey?logo=conventionalcommits)](https://www.conventionalcommits.org/en/v1.0.0/)

[![PHP Unit](https://img.shields.io/badge/testing-PHP_Unit-grey?style=social&logo=packagist)](https://phpunit.de/)
[![PHP CS Fixer](https://img.shields.io/badge/quality-PHP_CS_Fixer-grey?style=social&logo=packagist)](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)
[![PHP Mess Detector](https://img.shields.io/badge/quality-PHP_Mess_Detector-grey?style=social&logo=packagist)](https://phpmd.org/)
[![PHP Metrics](https://img.shields.io/badge/quality-PHP_Metrics-grey?style=social&logo=packagist)](https://phpmetrics.org/)
[![PHP Doc](https://img.shields.io/badge/doc-PHP_Doc-grey?style=social&logo=packagist)](https://docs.phpdoc.org/)

----

**PHP Markdown Extended** is a PHP parser to transform [Markdown](http://en.wikipedia.org/wiki/Markdown)
Expand Down

0 comments on commit a86a456

Please sign in to comment.