Skip to content

Commit 7692bca

Browse files
Updated GitHub actions workflow tests file
1 parent e66c5c3 commit 7692bca

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

.github/workflows/tests.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@ on: [push, pull_request]
44
jobs:
55
build:
66
strategy:
7+
fail-fast: false
78
matrix:
8-
os: [ubuntu-latest, windows-latest, macos-latest]
9-
php: ['7.2', '7.3', '7.4']
9+
operating-system: [ubuntu-latest, windows-latest, macos-latest]
10+
php-versions: ['7.4', '8.0']
1011
coverage: ["true"]
1112
composer-flags: [""]
13+
static-tests: ["true"]
1214
include:
13-
- php: "8.0"
15+
- php-versions: "7.2"
16+
static-tests: "false"
17+
18+
- php-versions: "7.3"
19+
static-tests: "false"
20+
21+
- php-versions: "8.0"
22+
composer-flags: "--ignore-platform-req=php"
23+
24+
- php-versions: "8.1"
1425
coverage: "false"
1526
composer-flags: "--ignore-platform-req=php"
1627
runs-on: ubuntu-latest
@@ -22,8 +33,8 @@ jobs:
2233
- name: Setup PHP, with composer and extensions
2334
uses: shivammathur/setup-php@v2
2435
with:
25-
php-version: ${{ matrix.php }}
26-
extensions: mbstring, curl
36+
php-version: ${{ matrix.php-versions }}
37+
extensions: mbstring, xml, ctype, iconv, curl
2738
coverage: xdebug
2839
tools: composer:v2
2940

@@ -41,13 +52,10 @@ jobs:
4152
restore-keys: ${{ runner.os }}-composer-
4253

4354
- name: Install dependencies
44-
run: composer update --no-progress --optimize-autoloader ${{ matrix.composer-flags }}
55+
run: composer install --no-progress --optimize-autoloader ${{ matrix.composer-flags }}
4556

4657
- name: Check Coding Standard
47-
run: |
48-
if [ "${{ matrix.coverage }}" == "true" ]; then
49-
vendor/bin/phpcs
50-
fi
58+
run: vendor/bin/phpcs
5159

5260
- name: Test with Phpunit
5361
run: |
@@ -60,9 +68,12 @@ jobs:
6068
6169
- name: Test with Phpstan
6270
run: |
63-
if [ "${{ matrix.coverage }}" == "true" ]; then
71+
if [ "${{ matrix.static-tests }}" == "true" ]; then
6472
vendor/bin/phpstan analyse
6573
fi
6674
6775
- name: Test with Psalm
68-
run: vendor/bin/psalm
76+
run: |
77+
if [ "${{ matrix.static-tests }}" == "true" ]; then
78+
vendor/bin/psalm --output-format=github
79+
fi

0 commit comments

Comments
 (0)