Skip to content

Commit

Permalink
Merge pull request #5 from mittwald/task/psalm
Browse files Browse the repository at this point in the history
Configure type checking with Psalm
  • Loading branch information
martin-helmich authored Nov 2, 2023
2 parents ec2cfff + 29e01c0 commit b168fe2
Show file tree
Hide file tree
Showing 15 changed files with 2,110 additions and 133 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PHP type checking and unit testing

on:
push:
branches: [ master ]
pull_request: {}

jobs:
build:
strategy:
matrix:
php-versions: ['8.2']
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, json
coverage: pcov

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run type checker
run: ./vendor/bin/psalm --php-version=${{ matrix.php-versions }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
/vendor/
/.idea
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

22 changes: 0 additions & 22 deletions .idea/deployer-recipe.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

36 changes: 0 additions & 36 deletions .idea/php.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

16 changes: 14 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"autoload": {
"psr-4": {
"Mittwald\\Deployer\\": "src/"
}
},
"files": [
"src/Util/functions.php"]
},
"authors": [
{
Expand All @@ -20,6 +22,16 @@
"composer/semver": "^3.4"
},
"require-dev": {
"deployer/deployer": "^7.3"
"deployer/deployer": "^7.3",
"vimeo/psalm": "^5.15"
},
"autoload-dev": {
"psr-4": {
"Deployer\\": "vendor/deployer/deployer/src"
},
"files": [
"vendor/deployer/deployer/src/functions.php",
"vendor/deployer/deployer/src/Support/helpers.php"
]
}
}
Loading

0 comments on commit b168fe2

Please sign in to comment.