11name : Run tests
22
3+ permissions :
4+ contents : read
5+
36on :
47 push :
58 pull_request :
@@ -12,15 +15,15 @@ jobs:
1215 continue-on-error : ${{ matrix.experimental }}
1316 strategy :
1417 matrix :
15- php-version : [ '8.2', '8.3', '8.4' ]
18+ php-version : [ '8.2', '8.3', '8.4', '8.5' ]
1619 os : [ ubuntu-latest ]
1720 experimental : [ false ]
1821 composer-options : [ '' ]
1922 include :
20- - { php-version: '8.5 ', experimental: true, os: ubuntu-latest, composer-options: '--ignore-platform-req=php+' }
23+ - { php-version: '8.6 ', experimental: true, os: ubuntu-latest, composer-options: '--ignore-platform-req=php+' }
2124 steps :
2225 - name : Checkout code
23- uses : actions/checkout@v4
26+ uses : actions/checkout@v6
2427 with :
2528 # Fetch some commits for Scrutinizer coverage upload
2629 fetch-depth : 15
@@ -38,15 +41,34 @@ jobs:
3841 coverage : xdebug
3942
4043 - name : Install Composer dependencies
41- uses : ramsey/composer-install@v3
44+ uses : ramsey/composer-install@v4
4245 with :
4346 composer-options : ${{ matrix.composer-options }}
4447
4548 - name : Run PHP tests
4649 run : composer run phpunit
4750
4851 - name : Send coverage
49- uses : codecov/codecov-action@v3
52+ uses : codecov/codecov-action@v6
53+ # Do not run this step on forked versions of the main repository (example: contributor forks)
54+ if : github.repository == 'phpmyadmin/sql-parser'
55+ with :
56+ fail_ci_if_error : true
57+ token : ${{ secrets.CODECOV_TOKEN }}
58+ flags : unit-${{ matrix.php-version }}-${{ matrix.os }}
59+ name : phpunit-${{ matrix.php-version }}-${{ matrix.os }}
60+ report_type : coverage
61+
62+ - name : Upload test results
63+ uses : codecov/codecov-action@v6
64+ # Do not run this step on forked versions of the main repository (example: contributor forks)
65+ if : ${{ github.repository == 'phpmyadmin/sql-parser' && !cancelled() }}
66+ with :
67+ fail_ci_if_error : true
68+ token : ${{ secrets.CODECOV_TOKEN }}
69+ flags : unit-${{ matrix.php-version }}-${{ matrix.os }}
70+ name : phpunit-${{ matrix.php-version }}-${{ matrix.os }}
71+ report_type : test_results
5072
5173 - name : Send coverage to Scrutinizer
5274 uses : sudo-bot/action-scrutinizer@latest
@@ -61,15 +83,15 @@ jobs:
6183 continue-on-error : ${{ matrix.experimental }}
6284 strategy :
6385 matrix :
64- php-version : [ '8.2', '8.3', '8.4' ]
86+ php-version : [ '8.2', '8.3', '8.4', '8.5' ]
6587 os : [ ubuntu-latest ]
6688 experimental : [ false ]
6789 composer-options : [ '' ]
6890 include :
69- - { php-version: '8.5 ', experimental: true, os: ubuntu-latest, composer-options: '--ignore-platform-req=php+' }
91+ - { php-version: '8.6 ', experimental: true, os: ubuntu-latest, composer-options: '--ignore-platform-req=php+' }
7092 steps :
7193 - name : Checkout code
72- uses : actions/checkout@v4
94+ uses : actions/checkout@v6
7395 with :
7496 # Fetch some commits for Scrutinizer coverage upload
7597 fetch-depth : 15
87109 coverage : xdebug
88110
89111 - name : Install Composer dependencies
90- uses : ramsey/composer-install@v3
112+ uses : ramsey/composer-install@v4
91113 with :
92114 composer-options : ${{ matrix.composer-options }}
93115
0 commit comments