Skip to content

Commit

Permalink
added static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Athlon1600 committed Aug 31, 2024
1 parent 78c0f67 commit 87740d6
Show file tree
Hide file tree
Showing 3 changed files with 791 additions and 548 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Static Analysis

on: [ push ]

jobs:
static:
name: PHPStan using PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none

- name: Install dependencies
run: composer update --no-interaction --no-progress --prefer-dist

- name: Static analysis
run: vendor/bin/phpstan analyse src --level=1
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
]
},
"require-dev": {
"phpunit/phpunit": "8"
"phpunit/phpunit": "^8.5.39 || ^9.5 || ^10.0",
"phpstan/phpstan": "^1.12"
}
}
Loading

0 comments on commit 87740d6

Please sign in to comment.