File tree Expand file tree Collapse file tree 2 files changed +25
-70
lines changed Expand file tree Collapse file tree 2 files changed +25
-70
lines changed Original file line number Diff line number Diff line change 1
- name : PHP Composer
1
+ name : Tests
2
2
3
3
on :
4
4
push :
5
5
branches : [ "main" ]
6
6
pull_request :
7
7
branches : [ "main" ]
8
8
9
- permissions :
10
- contents : read
11
-
12
9
jobs :
13
- build :
10
+ test :
11
+ runs-on : ${{ matrix.os }}
12
+ timeout-minutes : 5
13
+ strategy :
14
+ fail-fast : true
15
+ matrix :
16
+ os : [ubuntu-latest, windows-latest]
17
+ php : [8.1, 8.2, 8.3]
14
18
15
- runs-on : ubuntu-latest
19
+ name : P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
16
20
17
21
steps :
18
- - uses : actions/checkout@v3
22
+ - name : Checkout code
23
+ uses : actions/checkout@v4
19
24
20
- - name : Validate composer.json and composer.lock
21
- run : composer validate --strict
25
+ - name : Setup PHP
26
+ uses : shivammathur/setup-php@v2
27
+ with :
28
+ php-version : ${{ matrix.php }}
29
+ coverage : none
22
30
23
- - name : Cache Composer packages
24
- id : composer-cache
25
- uses : actions/cache@v3
26
- with :
27
- path : vendor
28
- key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
29
- restore-keys : |
30
- ${{ runner.os }}-php-
31
+ - name : Validate composer.json
32
+ run : composer validate
31
33
32
- - name : Install dependencies
33
- run : composer install --prefer-dist --no-progress
34
+ - name : Install dependencies
35
+ run : composer install --prefer-dist --no-interaction
34
36
35
- # Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
36
- # Docs: https://getcomposer.org/doc/articles/scripts.md
37
+ - name : List Installed Dependencies
38
+ run : composer show -D
37
39
38
- # - name: Run test suite
39
- # run: composer run-script test
40
+ - name : Execute tests
41
+ run : composer test
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments