Skip to content

Commit

Permalink
Clean up CI static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowhand committed Oct 16, 2024
1 parent a9b22c4 commit 5c17f56
Show file tree
Hide file tree
Showing 6 changed files with 560 additions and 366 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,21 @@ jobs:
- name: Install PHP
uses: shivammathur/[email protected]
with:
php-version: '8.3'
coverage: none
extensions: mbstring
php-version: "7.4"

- name: Install dependencies with composer
run: "composer update --no-interaction --no-progress && composer i --working-dir=ci"
- name: Install dependencies
run: >-
composer install
- name: Run vimeo/psalm
run: "ci/vendor/bin/psalm --threads=4"
- name: Install tools
run: >-
composer run install-tools
- name: Run static analysis
run: >-
composer run static-analysis
roave-bc-check:
name: Roave BC Check
Expand Down
5 changes: 0 additions & 5 deletions ci/composer.json

This file was deleted.

6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
"ergebnis/composer-normalize": true
}
},
"scripts": {
"install-tools": [
"composer --working-dir=tools/psalm install"
],
"static-analysis": "./tools/psalm/vendor/bin/psalm --threads=4 --root=$(pwd)"
},
"extra": {
"branch-alias": {
"dev-master": "1.10-dev"
Expand Down
12 changes: 4 additions & 8 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<?xml version="1.0"?>
<psalm
totallyTyped="true"
errorLevel="8"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config ci/vendor/vimeo/psalm/config.xsd"
phpVersion="7.3"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
<projectFiles>
<directory name="bin" />
<directory name="bin"/>
<directory name="tests/static-analysis" />
<ignoreFiles>
<directory name="ci"/>
</ignoreFiles>
</projectFiles>

</psalm>
5 changes: 5 additions & 0 deletions tools/psalm/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"require-dev": {
"vimeo/psalm": "^4.6.1"
}
}
Loading

0 comments on commit 5c17f56

Please sign in to comment.