Skip to content

Commit

Permalink
ci: update composer and add action for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bbene committed Jul 12, 2024
1 parent d2659e4 commit 810033e
Show file tree
Hide file tree
Showing 3 changed files with 1,550 additions and 881 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Unit Tests

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
php: ['8.2']
laravel: [9.*, 10.*, 11.*]
include:
- php: 8.1
laravel: 9.*
- php: 8.1
laravel: 10.*

name: Unit Tests - PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
steps:
- uses: actions/checkout@v1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, php-xml, sqlite3
coverage: xdebug

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction
- name: Run test suite
run: composer run-script test
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@
],
"license": "MIT",
"require": {
"carsdotcom/laravel-json-schema": "^v1.0.1 || ^v2 || dev-bbene-laravel-11",
"carsdotcom/laravel-json-schema": "^v1.0.1 || ^v2 || ^2.1",
"ext-json": "*",
"php": "^8.1",
"laravel/framework": "^9.19 || ^10.0 || ^11.0"
},
"require-dev": {
"brianium/paratest": "^6.6",
"fakerphp/faker": "^1.9.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"orchestra/testbench": "^7.11",
"nunomaduro/collision": "^6.1|7.*|8.*",
"orchestra/testbench": "7.*|8.*|9.*",
"phpunit/phpunit": "~8.0|~9.0|^10.5",
"phpstan/phpstan": "^1.8",
"phpunit/phpunit": "^9.5.10",
"squizlabs/php_codesniffer": "^3.7"
},
"autoload": {
Expand All @@ -44,6 +43,7 @@
"scripts": {
"post-autoload-dump": [
"@php ./vendor/bin/testbench package:discover --ansi"
]
],
"test": "vendor/bin/phpunit"
}
}
Loading

0 comments on commit 810033e

Please sign in to comment.