Skip to content
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
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests

on: push

permissions:
contents: read

jobs:
tests:
runs-on: ubuntu-latest

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- name: Validate composer.json and composer.lock
run: make composerValidate

- name: Install dependencies
run: |
cd ./src
composer install --prefer-dist --no-progress

- name: Run phpstan
run: make phpstan
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.PHONE composerValidate:
composerValidate:
cd ./src && composer validate --strict

.PHONE phpstan:
phpstan:
cd ./src && composer phpstan
14 changes: 14 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
parameters:
level: 5

paths:
- ./src/app
- ./src/www

includes:
- ./src/vendor/phpstan/phpstan-deprecation-rules/rules.neon
- ./src/vendor/phpstan/phpstan-dibi/extension.neon
- ./src/vendor/phpstan/phpstan-nette/extension.neon
- ./src/vendor/phpstan/phpstan-strict-rules/rules.neon
- ./src/vendor/spaze/phpstan-disallowed-calls/extension.neon
- phar://phpstan.phar/conf/bleedingEdge.neon
12 changes: 10 additions & 2 deletions src/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
},
"require-dev": {
"nette/tester": "^2.5",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-dibi": "^2.0",
"phpstan/phpstan-nette": "^2",
"phpstan/phpstan-strict-rules": "^2.0",
"spaze/phpstan-disallowed-calls": "^4.6",
"symfony/thanks": "^1"
},
"autoload": {
Expand All @@ -31,13 +35,17 @@
}
},
"scripts": {
"phpstan": "phpstan analyse",
"phpstan": "phpstan analyse -c ../phpstan.neon",
"tester": "tester tests -s"
},
"minimum-stability": "stable",
"config": {
"allow-plugins": {
"symfony/thanks": true
}
},
"platform": {
"php": "8.3"
},
"sort-packages": true
}
}
220 changes: 219 additions & 1 deletion src/composer.lock

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

10 changes: 0 additions & 10 deletions src/phpstan.neon

This file was deleted.