Skip to content

Commit bdf4011

Browse files
authored
Merge pull request #65 from cakephp/1.x-ci
update CI config
2 parents 89b698c + 5d67897 commit bdf4011

5 files changed

Lines changed: 30 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
testsuite-linux:
13-
runs-on: ubuntu-18.04
13+
runs-on: ubuntu-22.04
1414
strategy:
1515
fail-fast: false
1616
matrix:
@@ -62,7 +62,7 @@ jobs:
6262
6363
cs-stan:
6464
name: Coding Standard & Static Analysis
65-
runs-on: ubuntu-18.04
65+
runs-on: ubuntu-22.04
6666

6767
steps:
6868
- uses: actions/checkout@v2
@@ -73,13 +73,17 @@ jobs:
7373
php-version: '7.4'
7474
extensions: mbstring, intl
7575
coverage: none
76-
tools: psalm:~4.1.0, cs2pr
76+
tools: phive, cs2pr
7777

7878
- name: Composer Install
7979
run: composer install
8080

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

84+
- name: Install PHP tools with phive.
85+
run: phive install --trust-gpg-keys 'CF1A108D0E7AE720,51C67305FFC2E5C0,12CE0F1D262429A5'
86+
8487
- name: Run psalm
85-
run: psalm --output-format=github
88+
if: always()
89+
run: tools/psalm --output-format=github

.phive/phars.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phive xmlns="https://phar.io/phive">
3+
<phar name="psalm" version="4.30.0" installed="4.30.0" location="./tools/psalm" copy="false"/>
4+
</phive>

composer.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,13 @@
3535
"config": {
3636
"sort-packages": true
3737
},
38-
"prefer-stable": true
38+
"prefer-stable": true,
39+
"scripts": {
40+
"cs-check": "phpcs --colors --parallel=16 -p src/ tests/",
41+
"cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/",
42+
"psalm": "tools/psalm --show-info=false",
43+
"stan-setup": "phive install",
44+
"test": "phpunit",
45+
"test-coverage": "phpunit --coverage-clover=clover.xml"
46+
}
3947
}

psalm-baseline.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<files psalm-version="4.x-dev@">
3+
<file src="src/Plugin.php">
4+
<InvalidArgument occurrences="1">
5+
<code>$pathMap</code>
6+
</InvalidArgument>
7+
</file>
8+
</files>

psalm.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0"?>
22
<psalm
33
errorLevel="5"
4-
resolveFromConfigFile="true"
54
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
65
xmlns="https://getpsalm.org/schema/config"
76
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
7+
errorBaseline="psalm-baseline.xml"
88
>
99
<projectFiles>
1010
<directory name="src" />

0 commit comments

Comments
 (0)