Skip to content

Commit

Permalink
Cleanup, add test cases, raise MSI to 100% (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
devanych committed Jul 6, 2021
1 parent c9fedf5 commit d835ca8
Show file tree
Hide file tree
Showing 16 changed files with 218 additions and 201 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Expand Up @@ -12,3 +12,6 @@ trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
21 changes: 12 additions & 9 deletions .gitattributes
Expand Up @@ -22,16 +22,19 @@
*.ttf binary

# Ignore some meta files when creating an archive of this repository
/.github export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.scrutinizer.yml export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/docs export-ignore
/.github export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.phpunit-watcher.yml export-ignore
/.scrutinizer.yml export-ignore
/.styleci.yml export-ignore
/infection.json.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore
/tests export-ignore
/docs export-ignore

# Avoid merge conflicts in CHANGELOG
# https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/
/CHANGELOG.md merge=union

26 changes: 13 additions & 13 deletions .github/dependabot.yml
@@ -1,16 +1,16 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions.
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581
open-pull-requests-limit: 0
# Maintain dependencies for GitHub Actions.
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581
open-pull-requests-limit: 0

# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: increase-if-necessary
# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: increase-if-necessary
22 changes: 11 additions & 11 deletions .github/workflows/bc.yml
@@ -1,15 +1,15 @@
on:
- pull_request
- push
- pull_request
- push

name: backwards compatibility
jobs:
roave_bc_check:
name: Roave BC Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Roave BC Check
uses: docker://nyholm/roave-bc-check-ga
roave_bc_check:
name: Roave BC Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Roave BC Check
uses: docker://nyholm/roave-bc-check-ga
9 changes: 2 additions & 7 deletions .github/workflows/build.yml
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -54,13 +54,8 @@ jobs:
- name: Update composer
run: composer self-update

- name: Install dependencies with composer php 7.4
if: matrix.php == '7.4'
- name: Install dependencies with composer
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Install dependencies with composer php 8.0
if: matrix.php == '8.0'
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run tests with phpunit
run: vendor/bin/phpunit --colors=always
6 changes: 3 additions & 3 deletions .github/workflows/mutation.yml
Expand Up @@ -22,14 +22,14 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
php-version: ${{ matrix.php }}
ini-values: memory_limit=-1
coverage: "pcov"
coverage: pcov
tools: composer:v2

- name: Determine composer cache directory
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/static.yml
Expand Up @@ -17,15 +17,16 @@ jobs:

php:
- "7.4"
- "8.0"

steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
php-version: ${{ matrix.php }}
tools: composer:v2, cs2pr
coverage: none

Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Expand Up @@ -20,9 +20,5 @@ composer.lock
phpunit.phar
# local phpunit config
/phpunit.xml

# tests runtime
/runtime

# phpunit cache
.phpunit.result.cache
16 changes: 8 additions & 8 deletions .phpunit-watcher.yml
@@ -1,11 +1,11 @@
watch:
directories:
- src
- tests
fileMask: '*.php'
directories:
- src
- tests
fileMask: '*.php'
notifications:
passingTests: false
failingTests: false
passingTests: false
failingTests: false
phpunit:
binaryPath: vendor/bin/phpunit
timeout: 180
binaryPath: vendor/bin/phpunit
timeout: 180
59 changes: 28 additions & 31 deletions .scrutinizer.yml
@@ -1,36 +1,33 @@
checks:
php: true
php: true

filter:
paths:
- "src/*"
paths:
- "src/*"

build:
nodes:
analysis:
environment:
php: 7.4.12

tests:
override:
- php-scrutinizer-run

tests-and-coverage:
environment:
php: 7.4.12

dependencies:
override:
- composer self-update
- composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

tests:
override:
-
command: "./vendor/bin/phpunit --coverage-clover ./coverage.xml"
on_node: 1
coverage:
file: coverage.xml
format: php-clover


nodes:
analysis:
environment:
php: 7.4.12

tests:
override:
- php-scrutinizer-run

tests-and-coverage:
environment:
php: 7.4.12

dependencies:
override:
- composer self-update
- composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

tests:
override:
- command: "./vendor/bin/phpunit --coverage-clover ./coverage.xml"
on_node: 1
coverage:
file: coverage.xml
format: php-clover

0 comments on commit d835ca8

Please sign in to comment.