@@ -3,58 +3,59 @@ name: Run tests
33on :
44 push :
55 pull_request :
6- types : [opened, synchronize, reopened]
7- branches :
8- - master
96
107jobs :
11- test-php :
12- name : Test on php ${{ matrix.php-version }} (${{ matrix.php-extensions }}) and ${{ matrix.os }}
13- if : " !contains(github.event.head_commit.message, '[ci skip]')"
14- runs-on : ${{ matrix.os }}
15- continue-on-error : ${{ matrix.experimental }}
16- strategy :
17- matrix :
18- php-version : ["7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
19- php-extensions : ["dbase", ""]
20- os : [ubuntu-latest]
21- experimental : [false]
22- composer-options : ['']
23- include :
24- - { php-version: 'nightly', php-extensions: '', composer-options: '--ignore-platform-req=php', experimental: true, os: ubuntu-latest }
25- steps :
26- - uses : actions/checkout@v3
27- with :
28- # Fetch some commits for Scrutinizer coverage upload
29- fetch-depth : 15
30- - name : Use php ${{ matrix.php-version }}
31- uses : shivammathur/setup-php@v2
32- with :
33- php-version : ${{ matrix.php-version }}
34- extensions : ${{ matrix.php-extensions }}
35- coverage : xdebug
36- - name : Cache module
37- uses : actions/cache@v3
38- with :
39- path : ~/.composer/cache/
40- key : composer-cache
41- - name : Install dependencies
42- run : composer install --no-interaction ${{ matrix.composer-options }}
43- - name : Run php tests
44- run : composer run phpunit
45- - name : Run php examples
46- run : |
47- php -f examples/create_shapefile.php
48- php -f examples/read_point.php > /dev/null
49- php -f examples/read_polygon.php > /dev/null
50- - name : Send coverage
51- uses : codecov/codecov-action@v3
52- with :
53- flags : unit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
54- name : phpunit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
55- - name : Send coverage to Scrutinizer
56- uses : sudo-bot/action-scrutinizer@latest
57- # Do not run this step on forked versions of the main repository (example: contributor forks)
58- if : github.repository == 'phpmyadmin/shapefile'
59- with :
60- cli-args : " --format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"
8+ test-php :
9+ name : Test on PHP ${{ matrix.php-version }}
10+ runs-on : ${{ matrix.os }}
11+ continue-on-error : ${{ matrix.experimental }}
12+ strategy :
13+ matrix :
14+ php-version : ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
15+ php-extensions : ['dbase', '']
16+ os : [ubuntu-latest]
17+ experimental : [false]
18+ composer-options : ['']
19+ include :
20+ - { php-version: '8.4', php-extensions: '', composer-options: '--ignore-platform-req=php+', experimental: true, os: ubuntu-latest }
21+ steps :
22+ - name : Checkout code
23+ uses : actions/checkout@v4
24+ with :
25+ # Fetch some commits for Scrutinizer coverage upload
26+ fetch-depth : 15
27+
28+ - name : Set up PHP ${{ matrix.php-version }}
29+ uses : shivammathur/setup-php@v2
30+ with :
31+ php-version : ${{ matrix.php-version }}
32+ extensions : ${{ matrix.php-extensions }}
33+ coverage : xdebug
34+
35+ - name : Install Composer dependencies
36+ uses : ramsey/composer-install@v2
37+ with :
38+ dependency-versions : highest
39+ composer-options : ${{ matrix.composer-options }}
40+
41+ - name : Run PHP tests
42+ run : composer run phpunit
43+
44+ - name : Run PHP examples
45+ run : |
46+ php -f examples/create_shapefile.php
47+ php -f examples/read_point.php > /dev/null
48+ php -f examples/read_polygon.php > /dev/null
49+
50+ - name : Send coverage
51+ uses : codecov/codecov-action@v3
52+ with :
53+ flags : unit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
54+ name : phpunit-${{ matrix.php-version }}-${{ matrix.php-extensions }}-${{ matrix.os }}
55+
56+ - name : Send coverage to Scrutinizer
57+ uses : sudo-bot/action-scrutinizer@latest
58+ # Do not run this step on forked versions of the main repository (example: contributor forks)
59+ if : github.repository == 'phpmyadmin/shapefile'
60+ with :
61+ cli-args : " --format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"
0 commit comments