Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# https://dependabot.com/docs/config-file/

version: 1

update_configs:
- default_assignees:
- "mimmi20"
default_reviewers:
- "mimmi20"
directory: "/"
package_manager: "php:composer"
update_schedule: "live"
version_requirement_updates: "increase_versions"
commit_message:
prefix: "Build"
include_scope: true
246 changes: 246 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

on:
- pull_request
- push

name: Continuous Integration

jobs:
validate:
name: Validate

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Install PHP
uses: shivammathur/setup-php@1.3.9
with:
php-version: 7.1
extension-csv: mbstring, dom, xmlwriter #optional
ini-values-csv: "opcache.enable=1, opcache.enable_cli=1, zend.assertions=1, assert.exception=On" #optional
coverage: none #optional

- name: Validate composer.json
run: composer validate

- name: Update dependencies with composer
run: composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-suggest -vv

- name: Run localheinz/composer-normalize
run: composer normalize --dry-run

install:
name: Install/Update with composer

needs: validate

runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
max-parallel: 15
matrix:
php-versions:
- 7.1
- 7.2
- 7.3
- 7.4

operating-system:
- ubuntu-16.04
- ubuntu-18.04 # ubuntu-latest
- windows-2016
- windows-2019 # windows-latest
- macOS-10.14 # macOS-latest

dependencies:
- "--prefer-lowest"
- ""

steps:
- name: Checkout
uses: actions/checkout@master

- name: Install PHP
uses: shivammathur/setup-php@1.3.9
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, xmlwriter #optional
ini-values-csv: "opcache.enable=1, opcache.enable_cli=1, zend.assertions=1, assert.exception=On" #optional
coverage: none #optional

- name: Update dependencies with composer
run: composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-suggest -vv ${{ matrix.dependencies }}

coding-standards:
name: "Coding Standards"

needs: install

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Install PHP
uses: shivammathur/setup-php@1.3.9
with:
php-version: 7.1
extension-csv: mbstring, dom, xmlwriter #optional
ini-values-csv: "opcache.enable=1, opcache.enable_cli=1, zend.assertions=1, assert.exception=On" #optional
coverage: none #optional

- name: Update dependencies with composer
run: composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-suggest -vv

- name: Run friendsofphp/php-cs-fixer
run: vendor/bin/php-cs-fixer fix --dry-run -vv

- name: Run squizlabs/php_codesniffer
run: vendor/bin/phpcs --colors

static-code-analysis:
name: Static Code Analysis

needs: install

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Install PHP
uses: shivammathur/setup-php@1.3.9
with:
php-version: 7.1
extension-csv: mbstring, dom, xmlwriter #optional
ini-values-csv: "opcache.enable=1, opcache.enable_cli=1, zend.assertions=1, assert.exception=On" #optional
coverage: none #optional

- name: Update dependencies with composer
run: composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-suggest -vv

- name: Run phpstan/phpstan
run: vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=768M --no-progress

tests:
name: UnitTests

needs:
- coding-standards
- static-code-analysis

runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
max-parallel: 15
matrix:
php-versions:
- 7.1
- 7.2
- 7.3
- 7.4

operating-system:
- ubuntu-16.04
- ubuntu-18.04 # ubuntu-latest
- windows-2016
- windows-2019 # windows-latest
- macOS-10.14 # macOS-latest

dependencies:
- "--prefer-lowest"
- ""

steps:
- name: Checkout
uses: actions/checkout@master

- name: Install PHP
uses: shivammathur/setup-php@1.3.9
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, xmlwriter #optional
ini-values-csv: "opcache.enable=1, opcache.enable_cli=1, zend.assertions=1, assert.exception=On" #optional
coverage: none #optional

- name: Update dependencies with composer
run: composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-suggest -vv ${{ matrix.dependencies }}

- name: Run unit tests with phpunit/phpunit
run: vendor/bin/phpunit -c phpunit.xml --colors --no-coverage

code-coverage:
name: Code Coverage

needs: tests

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Install PHP
uses: shivammathur/setup-php@1.3.9
with:
php-version: 7.1
extension-csv: mbstring, dom, xmlwriter, xdebug #optional
ini-values-csv: "opcache.enable=1, opcache.enable_cli=1, zend.assertions=1, assert.exception=On" #optional
coverage: xdebug #optional

- name: Update dependencies with composer
run: composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-suggest -vv

- name: Collect code coverage with Xdebug and phpunit/phpunit
run: vendor/bin/phpunit -c phpunit.xml --colors --coverage-clover=clover.xml --coverage-text

- name: Download php-coveralls.phar
run: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar

- name: Upload coverage to Coveralls
run: php php-coveralls.phar --verbose --coverage_clover=clover.xml
env:
COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}}
COVERALLS_RUN_LOCALLY: 1

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.2
with:
token: ${{secrets.CODECOV_TOKEN}}
file: clover.xml
flags: phpunit

mutation-tests:
name: Mutation Tests

needs:
- tests
- code-coverage

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Install PHP
uses: shivammathur/setup-php@1.3.9
with:
php-version: 7.1
extension-csv: mbstring, dom, xmlwriter, xdebug #optional
ini-values-csv: "opcache.enable=1, opcache.enable_cli=1, zend.assertions=1, assert.exception=On" #optional
coverage: xdebug #optional

- name: Update dependencies with composer
run: composer update --optimize-autoloader --prefer-dist --prefer-stable --no-progress --no-interaction --no-suggest -vv

- name: Run mutation tests with infection/infection
run: vendor/bin/infection --min-covered-msi=95 --min-msi=95
13 changes: 13 additions & 0 deletions .github/workflows/lock-closed-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lock closed issue

on:
issues:
types: [closed]

jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: Dunning-Kruger/lock-issues@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Close stale issues and pull requests

on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 60
days-before-close: 7
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
stale-pr-message: >
This PR has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
Loading