Skip to content

Commit 9fbf8cb

Browse files
authored
Merge pull request #25 from andrewmy/add-ci-matrix
Add PHP and deps matrix to CI
2 parents 7f32765 + 02ea630 commit 9fbf8cb

File tree

4 files changed

+13
-2119
lines changed

4 files changed

+13
-2119
lines changed

.github/workflows/php.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,32 @@ on: [push]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
php: ['8.1', '8.2', '8.3', '8.4']
12+
dependencies: ['--prefer-lowest', '--prefer-dist']
13+
14+
name: PHP ${{ matrix.php }} unit tests on deps=${{ matrix.dependencies }}
815

916
steps:
1017
- name: Checkout
11-
uses: actions/checkout@v2
18+
uses: actions/checkout@v4
1219

1320
- name: Setup PHP
1421
uses: shivammathur/setup-php@v2
1522
with:
16-
php-version: '8.1.0'
23+
php-version: ${{ matrix.php }}
1724
extensions: mbstring, intl
1825
ini-values: post_max_size=256M, max_execution_time=180
1926
coverage: xdebug
2027
tools: php-cs-fixer, phpunit
2128

22-
- name: Validate composer.json and composer.lock
29+
- name: Validate composer.json
2330
run: composer validate
2431

2532
- name: Install dependencies
26-
run: composer install --prefer-dist --no-progress
33+
run: composer update --prefer-dist --no-progress ${{ matrix.dependencies }}
2734

2835
- name: PHP version
2936
run: php -v

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.vscode
33
codeCoverage
44
.phpunit.result.cache
5+
composer.lock

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727
},
2828
"require-dev": {
29-
"phpunit/phpunit": "^9"
29+
"phpunit/phpunit": "^9.6.29"
3030
},
3131
"scripts": {
3232
"test": "./vendor/bin/phpunit --colors=always --bootstrap vendor/autoload.php tests",

0 commit comments

Comments
 (0)