Skip to content

Commit

Permalink
feat(tests): add matrix testing, problem matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
ivuorinen committed Nov 8, 2024
1 parent 695407f commit a355224
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 8,592 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,36 @@ jobs:
build-test:
runs-on: ubuntu-latest

strategy:
matrix:
php_version:
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
- latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ matrix.php_version }}-${{ hashFiles('**/composer.lock') }}

- uses: php-actions/composer@v5
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: PHPUnit Tests
uses: php-actions/phpunit@v2
- uses: shivammathur/setup-php@v2
with:
php_extensions: xdebug mbstring
bootstrap: vendor/autoload.php
configuration: phpunit.xml
args: --coverage-text
php_version: ${{ matrix.php_version }}
tools: composer, phpunit

- name: Configure matchers
uses: mheap/phpunit-matcher-action@v1

- name: Run tests
run: composer test-ci

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vendor
vendor
composer.lock
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ php:
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
- nightly
matrix:
allow_failures:
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"require": {
"php": "^7|^8",
"php": "^7.4|^8",
"illuminate/support": "^5.3|^6|^7|^8|^9|^10|^11",
"doctrine/dbal": "^2.5|^2.6|^3"
},
Expand All @@ -37,7 +37,8 @@
}
},
"scripts": {
"test": "phpunit"
"test": "phpunit",
"test-ci": "phpunit --teamcity"
},
"extra": {
"branch-alias": {
Expand Down
Loading

0 comments on commit a355224

Please sign in to comment.