Changeset 58357 for branches/6.0/.github/workflows/php-compatibility.yml
- Timestamp:
- 06/06/2024 03:27:31 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.0/.github/workflows/php-compatibility.yml
r55490 r58357 9 9 - '[6-9].[0-9]' 10 10 tags: 11 - '5.[5-9]*' 12 - '[6-9].[0-9]*' 11 - '[0-9]+.[0-9]' 12 - '[0-9]+.[0-9].[0-9]+' 13 - '![34].[0-9].[0-9]+' 14 - '!5.[0-4].[0-9]+' 13 15 pull_request: 14 16 branches: … … 34 36 cancel-in-progress: true 35 37 38 # Disable permissions for all available scopes by default. 39 # Any needed permissions should be configured at the job level. 40 permissions: {} 41 36 42 jobs: 37 38 43 # Runs PHP compatibility testing. 39 #40 # Violations are reported inline with annotations.41 #42 # Performs the following steps:43 # - Checks out the repository.44 # - Sets up PHP.45 # - Logs debug information.46 # - Configures caching for PHP compatibility scans.47 # - Installs Composer dependencies.48 # - Make Composer packages available globally.49 # - Runs the PHP compatibility tests.50 # - Generate a report for displaying issues as pull request annotations.51 # - Ensures version-controlled files are not modified or deleted.52 44 php-compatibility: 53 45 name: Check PHP compatibility 54 runs-on: ubuntu-latest 55 timeout-minutes: 20 46 uses: WordPress/wordpress-develop/.github/workflows/reusable-php-compatibility.yml@trunk 47 permissions: 48 contents: read 56 49 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 57 58 steps: 59 - name: Checkout repository 60 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 61 62 - name: Set up PHP 63 uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0 64 with: 65 php-version: '7.4' 66 coverage: none 67 tools: cs2pr 68 69 - name: Log debug information 70 run: | 71 composer --version 72 73 # This date is used to ensure that the PHP compatibility cache is cleared at least once every week. 74 # http://man7.org/linux/man-pages/man1/date.1.html 75 - name: "Get last Monday's date" 76 id: get-date 77 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT 78 79 - name: Cache PHP compatibility scan cache 80 uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6 81 with: 82 path: .cache/phpcompat.json 83 key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }} 84 85 # Since Composer dependencies are installed using `composer update` and no lock file is in version control, 86 # passing a custom cache suffix ensures that the cache is flushed at least once per week. 87 - name: Install Composer dependencies 88 uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0 89 with: 90 custom-cache-suffix: ${{ steps.get-date.outputs.date }} 91 92 - name: Make Composer packages available globally 93 run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH 94 95 - name: Run PHP compatibility tests 96 id: phpcs 97 run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml 98 99 - name: Show PHPCompatibility results in PR 100 if: ${{ always() && steps.phpcs.outcome == 'failure' }} 101 run: cs2pr ./.cache/phpcs-compat-report.xml 102 103 - name: Ensure version-controlled files are not modified or deleted 104 run: git diff --exit-code 50 with: 51 php-version: '7.4' 105 52 106 53 slack-notifications: 107 54 name: Slack Notifications 108 55 uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk 56 permissions: 57 actions: read 58 contents: read 109 59 needs: [ php-compatibility ] 110 60 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }} … … 120 70 name: Failed workflow tasks 121 71 runs-on: ubuntu-latest 72 permissions: 73 actions: write 122 74 needs: [ php-compatibility, slack-notifications ] 123 75 if: | … … 132 84 steps: 133 85 - name: Dispatch workflow run 134 uses: actions/github-script@ 98814c53be79b1d30f795b907e553d8679345975 # v6.4.086 uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 135 87 with: 136 88 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.