Skip to content

Commit

Permalink
Additional QA tools
Browse files Browse the repository at this point in the history
  • Loading branch information
veewee committed Nov 15, 2023
1 parent 9c894ac commit dbd88dc
Show file tree
Hide file tree
Showing 11 changed files with 225 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [veewee]
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/Bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: 🐞 Bug Report
about: Something is broken? 🔨
---

### Bug Report

<!-- Fill in the relevant information below to help triage your issue. -->

| Q | A
|------------ | ------
| BC Break | yes/no
| Version | x.y.z

#### Summary

<!-- Provide a summary describing the problem you are experiencing. -->

#### Current behaviour

<!-- What is the current (buggy) behaviour? -->

#### How to reproduce

<!--
Provide steps to reproduce the bug.
If possible, also add a code snippet with relevant configuration, driver/platform information, SQL queries, etc.
Adding a failing Unit or Functional Test would help us a lot - you can submit one in a Pull Request separately, referencing this bug report.
-->

#### Expected behaviour

<!-- What was the expected (correct) behaviour? -->

18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/Feature_Request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: 🎉 Feature Request
about: You have a neat idea that should be implemented? 🎩
---

### Feature Request

<!-- Fill in the relevant information below to help triage your issue. -->

| Q | A
|------------ | ------
| New Feature | yes
| RFC | yes/no
| BC Break | yes/no

#### Summary

<!-- Provide a summary of the feature you would like to see implemented. -->
15 changes: 15 additions & 0 deletions .github/ISSUE_TEMPLATE/Support_Question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: ❓ Support Question
about: Have a problem that you can't figure out? 🤔
---

<!-- Fill in the relevant information below to help triage your issue. -->

| Q | A
|------------ | -----
| Version | x.y.z


### Support Question

<!-- Describe the issue you are facing here. -->
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Fill in the relevant information below to help triage your pull request. -->

| Q | A
|------------- | -----------
| Type | bug/feature/improvement
| BC Break | yes/no
| Fixed issues | <!-- use #NUM format to reference an issue -->

#### Summary

<!-- Provide a summary of your change. -->
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
30 changes: 30 additions & 0 deletions .github/workflows/analyzers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Analyzers

on:
pull_request: ~
push: ~
schedule:
- cron: '0 9 * * 5'

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2', '8.3']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
tools: 'composer:v2'
extensions: pcov, mbstring, posix, xdebug, dom, libxml, xml, xsl, xmlreader, xmlwriter
- name: Install dependencies
run: composer update --ignore-platform-req=php --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
- name: Run the tests
run: composer run psalm
29 changes: 29 additions & 0 deletions .github/workflows/code-style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CodeStyle

on: [push, pull_request]

env:
PHP_CS_FIXER_IGNORE_ENV: 1

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2', '8.3']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
tools: 'composer:v2'
extensions: pcov, mbstring, posix
- name: Install dependencies
run: composer --ignore-platform-req=php update --prefer-dist --no-progress --no-suggest ${{ matrix.composer-options }}
- name: Run the tests
run: composer run cs
34 changes: 34 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Tests

on:
pull_request: ~
push: ~
schedule:
- cron: '0 9 * * 5'

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2', '8.3']
experimental: [false]
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
tools: 'composer:v2'
ini-values: error_reporting=E_ALL
extensions: pcov, mbstring, posix, dom, libxml, xml, xsl, xmlreader, xmlwriter
- name: Install dependencies
run: composer update --ignore-platform-req=php --prefer-dist --no-progress --no-suggest
- name: Run the tests
run: composer run tests
- name: Check tests quality
run: composer run testquality
25 changes: 24 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,29 @@
"require-dev": {
"vimeo/psalm": "^5.15",
"phpunit/phpunit": "^10.4",
"friendsofphp/php-cs-fixer": "^3.38"
"friendsofphp/php-cs-fixer": "^3.38",
"veewee/composer-run-parallel": "^1.3",
"infection/infection": "^0.27.8"
},
"scripts": {
"cs": "PHP_CS_FIXER_IGNORE_ENV=1 php ./vendor/bin/php-cs-fixer.phar fix --dry-run",
"cs:fix": "PHP_CS_FIXER_IGNORE_ENV=1 php ./vendor/bin/php-cs-fixer.phar fix",
"psalm": "./vendor/bin/psalm --no-cache --stats",
"tests": "./vendor/bin/phpunit.phar --coverage-text --color",
"infection": [
"Composer\\Config::disableProcessTimeout",
"./vendor/bin/infection --show-mutations -v"
],
"ci": [
"@autoload",
"@parallel cs psalm tests",
"@parallel coverage infection"
]
},
"config": {
"allow-plugins": {
"veewee/composer-run-parallel": true,
"infection/extension-installer": true
}
}
}
21 changes: 21 additions & 0 deletions infection.json.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"source": {
"directories": [
"src"
]
},
"minMsi": 100,
"minCoveredMsi": 100,
"logs": {
"text": ".phpunit.cache/infection.log",
"html": ".phpunit.cache/infection"
},
"mutators": {
"@default": true,
"CastInt": {
"ignore": [
"VeeWee\\Reflecta\\*Exception::__construct"
]
}
}
}

0 comments on commit dbd88dc

Please sign in to comment.