Changeset 58300 for branches/6.3/.github/workflows/php-compatibility.yml
- Timestamp:
- 06/03/2024 05:00:05 PM (20 months ago)
- Location:
- branches/6.3
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
.github/workflows/php-compatibility.yml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.3
- Property svn:mergeinfo changed
/trunk merged: 57124-57125,57249,57918,58157
- Property svn:mergeinfo changed
-
branches/6.3/.github/workflows/php-compatibility.yml
r55717 r58300 41 41 42 42 jobs: 43 44 43 # Runs PHP compatibility testing. 45 #46 # Violations are reported inline with annotations.47 #48 # Performs the following steps:49 # - Checks out the repository.50 # - Sets up PHP.51 # - Logs debug information.52 # - Configures caching for PHP compatibility scans.53 # - Installs Composer dependencies.54 # - Make Composer packages available globally.55 # - Runs the PHP compatibility tests.56 # - Generate a report for displaying issues as pull request annotations.57 # - Ensures version-controlled files are not modified or deleted.58 44 php-compatibility: 59 45 name: Check PHP compatibility 60 runs-on: ubuntu-latest46 uses: WordPress/wordpress-develop/.github/workflows/reusable-php-compatibility.yml@trunk 61 47 permissions: 62 48 contents: read 63 timeout-minutes: 2064 49 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 65 66 steps: 67 - name: Checkout repository 68 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 69 70 - name: Set up PHP 71 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 72 with: 73 php-version: '7.4' 74 coverage: none 75 tools: cs2pr 76 77 - name: Log debug information 78 run: | 79 composer --version 80 81 # This date is used to ensure that the PHP compatibility cache is cleared at least once every week. 82 # http://man7.org/linux/man-pages/man1/date.1.html 83 - name: "Get last Monday's date" 84 id: get-date 85 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT 86 87 - name: Cache PHP compatibility scan cache 88 uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6 89 with: 90 path: .cache/phpcompat.json 91 key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }} 92 93 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 94 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 95 - name: Install Composer dependencies 96 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 97 with: 98 custom-cache-suffix: ${{ steps.get-date.outputs.date }} 99 100 - name: Make Composer packages available globally 101 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 102 103 - name: Run PHP compatibility tests 104 id: phpcs 105 run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml 106 107 - name: Show PHPCompatibility results in PR 108 if: ${{ always() && steps.phpcs.outcome == 'failure' }} 109 run: cs2pr ./.cache/phpcs-compat-report.xml 110 111 - name: Ensure version-controlled files are not modified or deleted 112 run: git diff --exit-code 50 with: 51 php-version: '7.4' 113 52 114 53 slack-notifications: … … 145 84 steps: 146 85 - name: Dispatch workflow run 147 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.086 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 148 87 with: 149 88 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.