2022-11-06 04:42:30 +08:00
|
|
|
name: PHP Deprecation Detector
|
|
|
|
# See https://github.com/wapmorgan/PhpDeprecationDetector
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2023-06-04 02:24:27 +08:00
|
|
|
paths:
|
|
|
|
- 'php/**'
|
2022-11-06 04:42:30 +08:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-06-04 02:24:27 +08:00
|
|
|
paths:
|
|
|
|
- 'php/**'
|
2022-11-06 04:42:30 +08:00
|
|
|
|
|
|
|
jobs:
|
2023-06-06 16:28:19 +08:00
|
|
|
phpdd:
|
2022-11-06 04:42:30 +08:00
|
|
|
name: PHP Deprecation Detector
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-05-11 02:40:04 +08:00
|
|
|
- name: Set up php8.2
|
2022-11-06 04:42:30 +08:00
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
2023-05-11 02:40:04 +08:00
|
|
|
php-version: 8.2
|
2022-11-06 04:42:30 +08:00
|
|
|
extensions: apcu
|
|
|
|
coverage: none
|
|
|
|
|
|
|
|
- name: Run script
|
|
|
|
run: |
|
|
|
|
set -x
|
|
|
|
cd php
|
|
|
|
composer global require wapmorgan/php-deprecation-detector dev-master
|
|
|
|
composer install
|
2023-03-20 23:10:38 +08:00
|
|
|
composer run php-deprecation-detector | tee -i ./phpdd.log
|
2023-03-20 23:04:28 +08:00
|
|
|
if grep "Total issues:" ./phpdd.log; then
|
|
|
|
exit 1
|
|
|
|
fi
|