Skip to content

Commit df3aa33

Browse files
committed
Update action
1 parent c6059c8 commit df3aa33

File tree

4 files changed

+61
-12
lines changed

4 files changed

+61
-12
lines changed

.github/workflows/tests.yml

+43-6
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,48 @@ on:
44
push
55

66
jobs:
7-
phpunit:
8-
name: Run PHPUnit
9-
runs-on: ubuntu-22.04
7+
tests:
8+
if: "!contains(github.event.head_commit.message, 'skip ci')"
9+
runs-on: ${{ matrix.os }}
10+
11+
strategy:
12+
matrix:
13+
php: [ 8.2, 8.1, 8.0, 7.4 ]
14+
laravel: [ 10, 9, 8 ]
15+
dependency-version: [ prefer-stable ]
16+
os: [ ubuntu-22.04 ]
17+
include:
18+
- laravel: 10
19+
testbench: 8.*
20+
- laravel: 9
21+
testbench: 7.*
22+
- laravel: 8
23+
testbench: 6.*
24+
exclude:
25+
- laravel: 10
26+
php: 8.0
27+
- laravel: 10
28+
php: 7.4
29+
- laravel: 9
30+
php: 7.4
31+
32+
name: PHP${{ matrix.php }} - Laravel ${{ matrix.laravel }}
1033

1134
steps:
12-
- uses: actions/checkout@v3
13-
- uses: php-actions/composer@v6
14-
- uses: php-actions/phpunit@v3
35+
- name: Checkout code
36+
uses: actions/checkout@v4
37+
38+
- name: Setup PHP
39+
uses: shivammathur/setup-php@v2
40+
with:
41+
php-version: ${{ matrix.php }}
42+
extensions: curl, libxml, mbstring, zip
43+
coverage: none
44+
45+
- name: Install dependencies
46+
run: |
47+
composer require "laravel/framework:${{ matrix.laravel }}.*" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
48+
composer update --${{ matrix.dependency-version }} --no-interaction
49+
50+
- name: Execute tests
51+
run: vendor/bin/phpunit --testdox --configuration phpunit.xml

composer.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
}
1919
],
2020
"require": {
21-
"php": ">=7.2",
22-
"illuminate/contracts": "^8.0|^9.0|^10.0",
21+
"php": ">=7.4",
22+
"illuminate/support": "^8.0||^9.0||^10.0",
2323
"aws/aws-sdk-php": "^3.145"
2424
},
2525
"require-dev": {
26-
"orchestra/testbench": "^6.0"
26+
"orchestra/testbench": "^6.0||^7.0||^8.0"
2727
},
2828
"autoload": {
2929
"psr-4": {
@@ -35,9 +35,6 @@
3535
"LaravelTimeWeaverTests\\": "tests/"
3636
}
3737
},
38-
"scripts": {
39-
"test": "phpunit"
40-
},
4138
"config": {
4239
"sort-packages": true,
4340
"allow-plugins": {

phpunit.xml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
3+
<coverage/>
4+
<testsuites>
5+
<testsuite name="Tests">
6+
<directory suffix="Test.php">./tests/</directory>
7+
</testsuite>
8+
</testsuites>
9+
<source>
10+
<include>
11+
<directory suffix=".php">./src</directory>
12+
</include>
13+
</source>
14+
</phpunit>

tests/.phpunit.result.cache

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1,"defects":[],"times":{"LaravelTimeWeaverTests\\TimeWeaverTest::testItForwardsToLogger":0.06}}

0 commit comments

Comments
 (0)