@@ -2,42 +2,56 @@ name: PHP Client - Demo Test
22
33on :
44 push :
5- branches : [ "master" ]
5+ branches :
6+ - master
7+ - feature/**
68 pull_request :
7- branches : [ "master" ]
9+ branches :
10+ - master
11+ - feature/**
12+ workflow_dispatch :
813
914permissions :
1015 contents : read
1116
1217jobs :
1318 build :
14-
15- runs-on : ubuntu-latest
19+ runs-on : ubuntu-22.04
20+ strategy :
21+ fail-fast : false
22+ matrix :
23+ php-version : ['8.2', '8.3', '8.4']
1624
1725 steps :
18- - uses : actions/checkout@v4
19-
20- - name : Setup PHP
21- uses : shivammathur/setup-php@v2
22- with :
23- php-version : ' 8.2'
24-
25- - name : Validate composer.json and composer.lock
26- run : composer validate --strict
27-
28- - name : Cache Composer packages
29- id : composer-cache
30- uses : actions/cache@v3
31- with :
32- path : vendor
33- key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
34- restore-keys : |
35- ${{ runner.os }}-php-
36-
37- - name : Install dependencies
38- run : composer install --prefer-dist --no-progress
39-
40- - name : Run test suite
41- run : |
42- cd ./demo
43- php ./NetLicensingDemo.php
26+ - uses : actions/checkout@v4
27+
28+ - name : Setup PHP ${{ matrix.php-version }}
29+ uses : shivammathur/setup-php@v2
30+ with :
31+ php-version : ${{ matrix.php-version }}
32+ coverage : none
33+ tools : composer:v2
34+
35+ - name : Validate composer manifests
36+ run : composer validate --strict
37+
38+ - name : Cache Composer packages
39+ id : composer-cache
40+ uses : actions/cache@v4
41+ with :
42+ path : vendor
43+ key : ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
44+ restore-keys : |
45+ ${{ runner.os }}-php-${{ matrix.php-version }}-
46+
47+ - name : Install dependencies
48+ run : composer install --prefer-dist --no-progress --no-interaction
49+
50+ - name : Run PHPUnit
51+ run : vendor/bin/phpunit --testsuite "Application Test Suite"
52+
53+ - name : Run demo scenario (latest PHP)
54+ if : matrix.php-version == '8.4'
55+ run : |
56+ cd demo
57+ php NetLicensingDemo.php
0 commit comments