Skip to content

Commit

Permalink
Merge 897035c into 9f2e22a
Browse files Browse the repository at this point in the history
  • Loading branch information
sspat committed Feb 11, 2022
2 parents 9f2e22a + 897035c commit 78f75e3
Show file tree
Hide file tree
Showing 15 changed files with 230 additions and 317 deletions.
185 changes: 185 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
name: "CI"
on:
pull_request:
push:
branches:
- "master"
env:
PHP_EXTENSIONS: "dom, mbstring, xml"
PHP_INI_VALUES: "memory_limit=-1, assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On"
jobs:
unit:
name: "Unit tests ${{matrix.php-version}}-${{matrix.operating-system}}-${{matrix.dependencies}}"
runs-on: ${{matrix.operating-system}}
strategy:
matrix:
operating-system:
- "ubuntu-latest"
- "windows-latest"
php-version:
- "7.3"
- "7.4"
- "8.0"
- "8.1"
dependencies:
- "lowest"
- "highest"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{matrix.php-version}}"
extensions: "${{env.PHP_EXTENSIONS}}"
ini-values: "${{env.PHP_INI_VALUES}}"
tools: "composer:v2"
- name: "Update composer"
run: "composer self-update"
- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"
- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Execute tests"
run: "vendor/bin/phpunit --fail-on-warning"
psalm:
name: "Psalm"
runs-on: "ubuntu-latest"
strategy:
matrix:
operating-system:
- "ubuntu-latest"
php-version:
- "8.1"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{matrix.php-version}}"
extensions: "${{env.PHP_EXTENSIONS}}"
ini-values: "${{env.PHP_INI_VALUES}}"
tools: "composer:v2"
- name: "Update composer"
run: "composer self-update"
- name: "Install highest dependencies"
run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Execute Psalm"
run: "vendor/bin/psalm"
stan:
name: "PhpStan"
runs-on: "ubuntu-latest"
strategy:
matrix:
operating-system:
- "ubuntu-latest"
php-version:
- "8.1"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{matrix.php-version}}"
extensions: "${{env.PHP_EXTENSIONS}}"
ini-values: "${{env.PHP_INI_VALUES}}"
tools: "composer:v2"
- name: "Update composer"
run: "composer self-update"
- name: "Install highest dependencies"
run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Execute PhpStan"
run: "composer stan"
code-style:
name: "Code style"
runs-on: "ubuntu-latest"
strategy:
matrix:
operating-system:
- "ubuntu-latest"
php-version:
- "8.1"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{matrix.php-version}}"
extensions: "${{env.PHP_EXTENSIONS}}"
ini-values: "${{env.PHP_INI_VALUES}}"
tools: "composer:v2, cs2pr"
- name: "Update composer"
run: "composer self-update"
- name: "Install highest dependencies"
run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Execute PhpCs"
run: "vendor/bin/phpcs -q --report=checkstyle | cs2pr"
mutation:
name: "Mutation"
runs-on: "ubuntu-latest"
strategy:
matrix:
operating-system:
- "ubuntu-latest"
php-version:
- "8.1"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{matrix.php-version}}"
extensions: "${{env.PHP_EXTENSIONS}}"
ini-values: "${{env.PHP_INI_VALUES}}"
tools: "composer:v2"
- name: "Update composer"
run: "composer self-update"
- name: "Install highest dependencies"
run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Execute PhpCs"
run: "vendor/bin/infection"
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
coverage:
name: "Mutation"
runs-on: "ubuntu-latest"
strategy:
matrix:
operating-system:
- "ubuntu-latest"
php-version:
- "8.1"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "pcov"
php-version: "${{matrix.php-version}}"
extensions: "${{env.PHP_EXTENSIONS}}"
ini-values: "${{env.PHP_INI_VALUES}}"
tools: "composer:v2"
- name: "Update composer"
run: "composer self-update"
- name: "Install highest dependencies"
run: "composer update --no-interaction --no-progress --no-suggest"
- name: "Code coverage"
run: |
vendor/bin/phpunit --testsuite=unit,functional --coverage-clover build/logs/clover.xml
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
php php-coveralls.phar --verbose
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
47 changes: 0 additions & 47 deletions .github/workflows/coding-standards.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/coverage.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/mutation-test.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/phpstan.yml

This file was deleted.

Loading

0 comments on commit 78f75e3

Please sign in to comment.