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
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
testsuite-linux:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:

cs-stan:
name: Coding Standard & Static Analysis
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2
Expand All @@ -73,13 +73,17 @@ jobs:
php-version: '7.4'
extensions: mbstring, intl
coverage: none
tools: psalm:~4.1.0, cs2pr
tools: phive, cs2pr

- name: Composer Install
run: composer install

- name: Run phpcs
run: vendor/bin/phpcs --report=checkstyle src/ tests/ | cs2pr

- name: Install PHP tools with phive.
run: phive install --trust-gpg-keys 'CF1A108D0E7AE720,51C67305FFC2E5C0,12CE0F1D262429A5'

- name: Run psalm
run: psalm --output-format=github
if: always()
run: tools/psalm --output-format=github
4 changes: 4 additions & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="psalm" version="4.30.0" installed="4.30.0" location="./tools/psalm" copy="false"/>
</phive>
10 changes: 9 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,13 @@
"config": {
"sort-packages": true
},
"prefer-stable": true
"prefer-stable": true,
"scripts": {
"cs-check": "phpcs --colors --parallel=16 -p src/ tests/",
"cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/",
"psalm": "tools/psalm --show-info=false",
"stan-setup": "phive install",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover=clover.xml"
}
}
8 changes: 8 additions & 0 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.x-dev@">
<file src="src/Plugin.php">
<InvalidArgument occurrences="1">
<code>$pathMap</code>
</InvalidArgument>
</file>
</files>
2 changes: 1 addition & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<psalm
errorLevel="5"
resolveFromConfigFile="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="src" />
Expand Down