Skip to content

Commit d612d62

Browse files
authored
Fix tests (#7)
* Fix tests * Fix tests * wip
1 parent 172e53a commit d612d62

File tree

2 files changed

+41
-20
lines changed

2 files changed

+41
-20
lines changed

.github/workflows/run-tests.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,35 @@ name: run-tests
22

33
on:
44
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
5+
paths:
6+
- '**.php'
7+
- '.github/workflows/run-tests.yml'
8+
- 'phpunit.xml.dist'
9+
- 'composer.json'
10+
- 'composer.lock'
811

912
jobs:
1013
test:
1114
runs-on: ${{ matrix.os }}
15+
timeout-minutes: 5
1216
strategy:
1317
fail-fast: true
1418
matrix:
1519
os: [ubuntu-latest]
16-
php: [8.2, 8.3]
17-
laravel: [11.*]
20+
php: [8.3, 8.2]
21+
laravel: [11.*, 10.*]
22+
stability: [prefer-lowest, prefer-stable]
1823
include:
1924
- laravel: 11.*
2025
testbench: 9.*
26+
- laravel: 10.*
27+
testbench: 8.*
2128

2229
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
2330

2431
steps:
2532
- name: Checkout code
26-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
2734

2835
- name: Setup PHP
2936
uses: shivammathur/setup-php@v2
@@ -39,11 +46,11 @@ jobs:
3946
4047
- name: Install dependencies
4148
run: |
42-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction
49+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
4350
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
4451
4552
- name: List Installed Dependencies
4653
run: composer show -D
4754

4855
- name: Execute tests
49-
run: vendor/bin/pest
56+
run: vendor/bin/pest --ci

composer.json

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,22 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^8.1|^8.2|^8.3|^8.4",
20-
"illuminate/contracts": "^10.0|^11.0",
21-
"spatie/laravel-package-tools": "^1.16.4"
19+
"php": "^8.2",
20+
"spatie/laravel-package-tools": "^1.16",
21+
"illuminate/contracts": "^10.0|^11.0"
2222
},
2323
"require-dev": {
24-
"laravel/pint": "^1.0",
25-
"nunomaduro/collision": "^7.9",
26-
"nunomaduro/larastan": "^2.0",
27-
"pestphp/pest": "^2.21",
28-
"pestphp/pest-plugin-laravel": "^2.0",
29-
"phpstan/extension-installer": "^1.1",
30-
"phpstan/phpstan-deprecation-rules": "^1.0",
31-
"phpstan/phpstan-phpunit": "^1.0"
24+
"laravel/pint": "^1.14",
25+
"nunomaduro/collision": "^8.1.1||^7.10.0",
26+
"larastan/larastan": "^2.9",
27+
"orchestra/testbench": "^9.0.0||^8.22.0",
28+
"pestphp/pest": "^2.34",
29+
"pestphp/pest-plugin-arch": "^2.7",
30+
"pestphp/pest-plugin-laravel": "^2.3",
31+
"phpstan/extension-installer": "^1.3",
32+
"phpstan/phpstan-deprecation-rules": "^1.1",
33+
"phpstan/phpstan-phpunit": "^1.3",
34+
"spatie/laravel-ray": "^1.35"
3235
},
3336
"autoload": {
3437
"psr-4": {
@@ -42,7 +45,18 @@
4245
}
4346
},
4447
"scripts": {
45-
"post-autoload-dump": "@php ./vendor/bin/testbench package:discover --ansi",
48+
"post-autoload-dump": "@composer run prepare",
49+
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
50+
"prepare": "@php vendor/bin/testbench package:discover --ansi",
51+
"build": [
52+
"@composer run prepare",
53+
"@php vendor/bin/testbench workbench:build --ansi"
54+
],
55+
"start": [
56+
"Composer\\Config::disableProcessTimeout",
57+
"@composer run build",
58+
"@php vendor/bin/testbench serve"
59+
],
4660
"analyse": "vendor/bin/phpstan analyse",
4761
"test": "vendor/bin/pest",
4862
"test-coverage": "vendor/bin/pest --coverage",

0 commit comments

Comments
 (0)