Skip to content

Commit a5b8e13

Browse files
committed
- reworked GitHub Actions for older PHP versions
- updated Psalm configuration - added .idea directory to .gitignore, - enabled manual dispatch of GitHub Actions
1 parent a4fee30 commit a5b8e13

4 files changed

Lines changed: 36 additions & 4 deletions

File tree

‎.github/workflows/test-old.yaml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: TestOld
2+
3+
on:
4+
push:
5+
branches: ['master']
6+
pull_request: ~
7+
workflow_dispatch: ~
8+
9+
jobs:
10+
test:
11+
runs-on: '${{ matrix.os }}'
12+
strategy:
13+
matrix:
14+
php: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3']
15+
os: ['ubuntu-latest']
16+
steps:
17+
- name: 'Checkout'
18+
uses: 'actions/checkout@v2'
19+
- name: 'Install PHP'
20+
uses: 'shivammathur/setup-php@v2'
21+
with:
22+
php-version: '${{ matrix.php }}'
23+
tools: 'composer:v1'
24+
coverage: 'xdebug'
25+
- name: 'PHP'
26+
run: 'php -v'
27+
28+
- name: 'Composer'
29+
run: 'composer install'
30+
continue-on-error: '${{ matrix.failure }}'
31+
- name: 'PHPUnit'
32+
run: 'php vendor/bin/phpunit --coverage-text'

‎.github/workflows/test.yaml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ on:
44
push:
55
branches: ['master']
66
pull_request: ~
7+
workflow_dispatch: ~
78

89
jobs:
910
test:
1011
runs-on: '${{ matrix.os }}'
1112
strategy:
1213
matrix:
13-
php: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
14+
php: ['7.4', '8.0', '8.1']
1415
os: ['ubuntu-latest']
1516
failure: [false]
1617
include:
@@ -37,11 +38,9 @@ jobs:
3738
run: |
3839
composer require --dev vimeo/psalm
3940
php vendor/bin/psalm --shepherd --php-version=${{ matrix.php }}
40-
if: '${{ matrix.php >= 7.1 }}'
4141
continue-on-error: '${{ matrix.failure }}'
4242
- name: 'Infection'
4343
run: |
4444
composer require --dev --with-all-dependencies infection/infection
4545
php vendor/bin/infection
46-
if: '${{ matrix.php >= 7.1 }}'
4746
continue-on-error: '${{ matrix.failure }}'

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.idea
12
.phpunit.result.cache
23
infection.log
34
vendor

‎psalm.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<psalm
3-
totallyTyped="true"
3+
errorLevel="1"
44
findUnusedCode="false"
55
findUnusedVariablesAndParams="true"
66
findUnusedPsalmSuppress="true"

0 commit comments

Comments
 (0)