Skip to content

Commit

Permalink
Improving the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
floriankraemer authored Jun 30, 2024
2 parents ecd435a + 41c858f commit 1a205e3
Show file tree
Hide file tree
Showing 50 changed files with 2,477 additions and 737 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379

strategy:
Expand All @@ -54,7 +53,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, json, fileinfo
extensions: json, fileinfo
tools: pecl
coverage: pcov

Expand All @@ -68,15 +67,21 @@ jobs:
- name: Run PHPUnit
run: |
if [[ ${{ matrix.php-version }} == '8.1' ]]; then
if [[ ${{ matrix.php-version }} == '8.2' ]]; then
bin/phpunit --coverage-clover=coverage.xml
else
bin/phpunit
fi
- name: Code Coverage Report
if: success() && matrix.php-version == '8.1'
if: success() && matrix.php-version == '8.2'
uses: codecov/codecov-action@v4

- name: Run Infection
run: |
if [[ ${{ matrix.php-version }} == '8.2' ]]; then
bin/infection
fi
cs-stan:
name: Coding Standard & Static Analysis
runs-on: ubuntu-20.04
Expand All @@ -90,8 +95,8 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, json, fileinfo
coverage: none
extensions: json, fileinfo
coverage: pcov
tools: pecl

- name: Composer install
Expand All @@ -102,3 +107,6 @@ jobs:

- name: Run phpstan
run: bin/phpstan -V && bin/phpstan --error-format=github

- name: Run Infection
run: bin/infection
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/tmp
.idea
.phpunit.result.cache
infection.log
*.drawio.bkp
*.drawio.dtmp

19 changes: 19 additions & 0 deletions .idea/eventsourcing.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 20 additions & 6 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
},
"require-dev": {
"ext-pdo": "*",
"infection/infection": "^0.29.6",
"phpmd/phpmd": "^2.15",
"phpro/grumphp-shim": "^2.5",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.6",
"psr/container": "^1.0||^2.0",
"psr/log": "^2.0||^3.0",
"ramsey/uuid": "^4.7",
"squizlabs/php_codesniffer": "^4.0",
"symfony/messenger": "^6.0||^7.0",
"symfony/var-dumper": "^6.0||^7.1",
"psr/container": "^1.0||^2.0",
"psr/log": "^2.0||^3.0"
"symfony/var-dumper": "^6.0||^7.1"
},
"suggest": {
"psr/container": "If you want to use the repository factory.",
Expand All @@ -49,7 +50,8 @@
"sort-packages": true,
"bin-dir": "./bin",
"allow-plugins": {
"phpro/grumphp-shim": true
"phpro/grumphp-shim": true,
"infection/extension-installer": true
}
},
"scripts": {
Expand Down
Loading

0 comments on commit 1a205e3

Please sign in to comment.