Make WordPress Core

Changeset 58166


Ignore:
Timestamp:
05/17/2024 06:12:02 PM (6 months ago)
Author:
desrosj
Message:

Build/Test Tools: Use new reusable workflows in the 6.5 branch.

This updates the 6.5 branch to utilize the new reusable workflows in trunk introduced in [58165].

Props johnbillion, swissspidy, jorbin.
See #61213.

Location:
branches/6.5/.github/workflows
Files:
4 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • branches/6.5/.github/workflows/coding-standards.yml

    r57757 r58166  
    4646
    4747jobs:
    48   # Runs PHP coding standards checks.
    49   #
    50   # Violations are reported inline with annotations.
    51   #
    52   # Performs the following steps:
    53   # - Checks out the repository.
    54   # - Sets up PHP.
    55   # - Configures caching for PHPCS scans.
    56   # - Installs Composer dependencies.
    57   # - Make Composer packages available globally.
    58   # - Runs PHPCS on the full codebase with warnings suppressed.
    59   # - Generate a report for displaying issues as pull request annotations.
    60   # - Runs PHPCS on the `tests` directory without warnings suppressed.
    61   # - Generate a report for displaying `test` directory issues as pull request annotations.
    62   # - Ensures version-controlled files are not modified or deleted.
     48  # Runs the PHP coding standards checks.
    6349  phpcs:
    6450    name: PHP coding standards
    65     runs-on: ubuntu-latest
     51    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk
    6652    permissions:
    6753      contents: read
    68     timeout-minutes: 20
    6954    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    7055
    71     steps:
    72       - name: Checkout repository
    73         uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
    74         with:
    75           show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
    76 
    77       - name: Set up PHP
    78         uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0
    79         with:
    80           php-version: 'latest'
    81           coverage: none
    82           tools: cs2pr
    83 
    84       # This date is used to ensure that the PHPCS cache is cleared at least once every week.
    85       # http://man7.org/linux/man-pages/man1/date.1.html
    86       - name: "Get last Monday's date"
    87         id: get-date
    88         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    89 
    90       - name: Cache PHPCS scan cache
    91         uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
    92         with:
    93           path: |
    94             .cache/phpcs-src.json
    95             .cache/phpcs-tests.json
    96           key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
    97 
    98       # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
    99       # passing a custom cache suffix ensures that the cache is flushed at least once per week.
    100       - name: Install Composer dependencies
    101         uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
    102         with:
    103           custom-cache-suffix: ${{ steps.get-date.outputs.date }}
    104 
    105       - name: Make Composer packages available globally
    106         run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    107 
    108       - name: Run PHPCS on all Core files
    109         id: phpcs-core
    110         run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml
    111 
    112       - name: Show PHPCS results in PR
    113         if: ${{ always() && steps.phpcs-core.outcome == 'failure' }}
    114         run: cs2pr ./.cache/phpcs-report.xml
    115 
    116       - name: Check test suite files for warnings
    117         id: phpcs-tests
    118         run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml
    119 
    120       - name: Show test suite scan results in PR
    121         if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }}
    122         run: cs2pr ./.cache/phpcs-tests-report.xml
    123 
    124       - name: Ensure version-controlled files are not modified during the tests
    125         run: git diff --exit-code
    126 
    12756  # Runs the JavaScript coding standards checks.
    128   #
    129   # JSHint violations are not currently reported inline with annotations.
    130   #
    131   # Performs the following steps:
    132   # - Checks out the repository.
    133   # - Sets up Node.js.
    134   # - Logs debug information about the GitHub Action runner.
    135   # - Installs npm dependencies.
    136   # - Run the WordPress JSHint checks.
    137   # - Ensures version-controlled files are not modified or deleted.
    13857  jshint:
    13958    name: JavaScript coding standards
    140     runs-on: ubuntu-latest
     59    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
    14160    permissions:
    14261      contents: read
    143     timeout-minutes: 20
    14462    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    145     env:
    146       PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
    147 
    148     steps:
    149       - name: Checkout repository
    150         uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
    151         with:
    152           show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
    153 
    154       - name: Set up Node.js
    155         uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
    156         with:
    157           node-version-file: '.nvmrc'
    158           cache: npm
    159 
    160       - name: Log debug information
    161         run: |
    162           npm --version
    163           node --version
    164           git --version
    165 
    166       - name: Install npm Dependencies
    167         run: npm ci
    168 
    169       - name: Run JSHint
    170         run: npm run grunt jshint
    171 
    172       - name: Ensure version-controlled files are not modified or deleted
    173         run: git diff --exit-code
    17463
    17564  slack-notifications:
  • branches/6.5/.github/workflows/end-to-end-tests.yml

    r57927 r58166  
    3737jobs:
    3838  # Runs the end-to-end test suite.
    39   #
    40   # Performs the following steps:
    41   # - Sets environment variables.
    42   # - Checks out the repository.
    43   # - Sets up Node.js.
    44   # - Logs debug information about the GitHub Action runner.
    45   # - Installs npm dependencies.
    46   # - Install Playwright browsers.
    47   # - Builds WordPress to run from the `build` directory.
    48   # - Starts the WordPress Docker container.
    49   # - Logs the running Docker containers.
    50   # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).
    51   # - Install WordPress within the Docker container.
    52   # - Install Gutenberg.
    53   # - Run the E2E tests.
    54   # - Ensures version-controlled files are not modified or deleted.
    5539  e2e-tests:
    56     name: E2E Tests with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
    57     runs-on: ubuntu-latest
     40    name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
     41    uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk
    5842    permissions:
    5943      contents: read
    60     timeout-minutes: 20
    6144    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    6245    strategy:
     
    6447      matrix:
    6548        LOCAL_SCRIPT_DEBUG: [ true, false ]
    66 
    67     steps:
    68       - name: Configure environment variables
    69         run: |
    70           echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
    71           echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
    72 
    73       - name: Checkout repository
    74         uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
    75         with:
    76           show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
    77 
    78       - name: Set up Node.js
    79         uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
    80         with:
    81           node-version-file: '.nvmrc'
    82           cache: npm
    83 
    84       - name: Log debug information
    85         run: |
    86           npm --version
    87           node --version
    88           curl --version
    89           git --version
    90           locale -a
    91 
    92       - name: Install npm Dependencies
    93         run: npm ci
    94 
    95       - name: Install Playwright browsers
    96         run: npx playwright install --with-deps
    97 
    98       - name: Build WordPress
    99         run: npm run build
    100 
    101       - name: Start Docker environment
    102         run: |
    103           npm run env:start
    104 
    105       - name: Log running Docker containers
    106         run: docker ps -a
    107 
    108       - name: Docker debug information
    109         run: |
    110           docker -v
    111           docker compose run --rm mysql mysql --version
    112           docker compose run --rm php php --version
    113           docker compose run --rm php php -m
    114           docker compose run --rm php php -i
    115           docker compose run --rm php locale -a
    116 
    117       - name: Install WordPress
    118         env:
    119           LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
    120         run: npm run env:install
    121 
    122       - name: Install Gutenberg
    123         run: npm run env:cli -- plugin install gutenberg --path=/var/www/${{ env.LOCAL_DIR }}
    124 
    125       - name: Run E2E tests
    126         run: npm run test:e2e
    127 
    128       - name: Archive debug artifacts (screenshots, HTML snapshots)
    129         uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
    130         if: always()
    131         with:
    132             name: failures-artifacts${{ matrix.LOCAL_SCRIPT_DEBUG && '-SCRIPT_DEBUG' || '' }}-${{ github.run_id }}
    133             path: artifacts
    134             if-no-files-found: ignore
    135 
    136       - name: Ensure version-controlled files are not modified or deleted
    137         run: git diff --exit-code
     49    with:
     50      LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
    13851
    13952  slack-notifications:
  • branches/6.5/.github/workflows/javascript-tests.yml

    r57655 r58166  
    4444
    4545jobs:
    46   # Runs the QUnit tests for WordPress.
    47   #
    48   # Performs the following steps:
    49   # - Checks out the repository.
    50   # - Sets up Node.js.
    51   # - Logs debug information about the GitHub Action runner.
    52   # - Installs npm dependencies.
    53   # - Run the WordPress QUnit tests.
    54   # - Ensures version-controlled files are not modified or deleted.
     46  # Runs the WordPress Core JavaScript tests.
    5547  test-js:
    5648    name: QUnit Tests
    57     runs-on: ubuntu-latest
     49    uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk
    5850    permissions:
    5951      contents: read
    60     timeout-minutes: 20
    6152    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    62 
    63     steps:
    64       - name: Checkout repository
    65         uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
    66         with:
    67           show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
    68 
    69       - name: Set up Node.js
    70         uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
    71         with:
    72           node-version-file: '.nvmrc'
    73           cache: npm
    74 
    75       - name: Log debug information
    76         run: |
    77           npm --version
    78           node --version
    79           git --version
    80 
    81       - name: Install npm Dependencies
    82         run: npm ci
    83 
    84       - name: Run QUnit tests
    85         run: npm run grunt qunit:compiled
    86 
    87       - name: Ensure version-controlled files are not modified or deleted
    88         run: git diff --exit-code
    8953
    9054  slack-notifications:
  • branches/6.5/.github/workflows/performance.yml

    r57927 r58166  
    3030permissions: {}
    3131
    32 env:
    33   PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
    34 
    35   # Performance testing should be performed in an environment reflecting a standard production environment.
    36   LOCAL_WP_DEBUG: false
    37   LOCAL_SCRIPT_DEBUG: false
    38   LOCAL_SAVEQUERIES: false
    39   LOCAL_WP_DEVELOPMENT_MODE: "''"
    40 
    41   # This workflow takes two sets of measurements — one for the current commit,
    42   # and another against a consistent version that is used as a baseline measurement.
    43   # This is done to isolate variance in measurements caused by the GitHub runners
    44   # from differences caused by code changes between commits. The BASE_TAG value here
    45   # represents the version being used for baseline measurements. It should only be
    46   # changed if we want to normalize results against a different baseline.
    47   BASE_TAG: '6.1.1'
    48   LOCAL_DIR: build
    49   TARGET_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || '' }}
    50   TARGET_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
    51 
    5232jobs:
    5333  # Runs the performance test suite.
    54   #
    55   # Performs the following steps:
    56   # - Configure environment variables.
    57   # - Checkout repository.
    58   # - Set up Node.js.
    59   # - Log debug information.
    60   # - Install npm dependencies.
    61   # - Install Playwright browsers.
    62   # - Build WordPress.
    63   # - Start Docker environment.
    64   # - Log running Docker containers.
    65   # - Docker debug information.
    66   # - Install WordPress.
    67   # - Install WordPress Importer plugin.
    68   # - Import mock data.
    69   # - Update permalink structure.
    70   # - Install MU plugin.
    71   # - Run performance tests (current commit).
    72   # - Print performance tests results.
    73   # - Check out target commit (target branch or previous commit).
    74   # - Switch Node.js versions if necessary.
    75   # - Install npm dependencies.
    76   # - Build WordPress.
    77   # - Run any database upgrades.
    78   # - Run performance tests (previous/target commit).
    79   # - Print target performance tests results.
    80   # - Reset to original commit.
    81   # - Switch Node.js versions if necessary.
    82   # - Install npm dependencies.
    83   # - Set the environment to the baseline version.
    84   # - Run any database upgrades.
    85   # - Run baseline performance tests.
    86   # - Print baseline performance tests results.
    87   # - Compare results with base.
    88   # - Add workflow summary.
    89   # - Set the base sha.
    90   # - Set commit details.
    91   # - Publish performance results.
    92   # - Ensure version-controlled files are not modified or deleted.
    93   # - Dispatch workflow run.
    9434  performance:
    9535    name: Run performance tests
    96     runs-on: ubuntu-latest
     36    uses: WordPress/wordpress-develop/.github/workflows/reusable-performance.yml@trunk
    9737    permissions:
    9838      contents: read
    9939    if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ! contains( github.event.before, '00000000' ) }}
    100 
    101     steps:
    102       - name: Configure environment variables
    103         run: |
    104           echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
    105           echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
    106 
    107       - name: Checkout repository
    108         uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
    109         with:
    110           show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
    111 
    112       - name: Set up Node.js
    113         uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
    114         with:
    115           node-version-file: '.nvmrc'
    116           cache: npm
    117 
    118       - name: Log debug information
    119         run: |
    120           npm --version
    121           node --version
    122           curl --version
    123           git --version
    124           locale -a
    125 
    126       - name: Install npm dependencies
    127         run: npm ci
    128 
    129       - name: Install Playwright browsers
    130         run: npx playwright install --with-deps
    131 
    132       - name: Build WordPress
    133         run: npm run build
    134 
    135       - name: Start Docker environment
    136         run: |
    137           npm run env:start
    138 
    139       - name: Log running Docker containers
    140         run: docker ps -a
    141 
    142       - name: Docker debug information
    143         run: |
    144           docker -v
    145           docker compose run --rm mysql mysql --version
    146           docker compose run --rm php php --version
    147           docker compose run --rm php php -m
    148           docker compose run --rm php php -i
    149           docker compose run --rm php locale -a
    150 
    151       - name: Install WordPress
    152         run: npm run env:install
    153 
    154       - name: Install WordPress Importer plugin
    155         run: npm run env:cli -- plugin install wordpress-importer --activate --path=/var/www/${{ env.LOCAL_DIR }}
    156 
    157       - name: Import mock data
    158         run: |
    159           curl -O https://raw.githubusercontent.com/WordPress/theme-test-data/b9752e0533a5acbb876951a8cbb5bcc69a56474c/themeunittestdata.wordpress.xml
    160           npm run env:cli -- import themeunittestdata.wordpress.xml --authors=create --path=/var/www/${{ env.LOCAL_DIR }}
    161           rm themeunittestdata.wordpress.xml
    162 
    163       - name: Update permalink structure
    164         run: |
    165           npm run env:cli -- rewrite structure '/%year%/%monthnum%/%postname%/' --path=/var/www/${{ env.LOCAL_DIR }}
    166 
    167       - name: Install additional languages
    168         run: |
    169           npm run env:cli -- language core install de_DE --path=/var/www/${{ env.LOCAL_DIR }}
    170           npm run env:cli -- language plugin install de_DE --all --path=/var/www/${{ env.LOCAL_DIR }}
    171           npm run env:cli -- language theme install de_DE --all --path=/var/www/${{ env.LOCAL_DIR }}
    172 
    173       - name: Install MU plugin
    174         run: |
    175           mkdir ./${{ env.LOCAL_DIR }}/wp-content/mu-plugins
    176           cp ./tests/performance/wp-content/mu-plugins/server-timing.php ./${{ env.LOCAL_DIR }}/wp-content/mu-plugins/server-timing.php
    177 
    178       - name: Run performance tests (current commit)
    179         run: npm run test:performance
    180 
    181       - name: Print performance tests results
    182         run: node ./tests/performance/results.js
    183 
    184       - name: Check out target commit (target branch or previous commit)
    185         run: |
    186           if [[ -z "$TARGET_REF" ]]; then
    187             git fetch -n origin $TARGET_SHA
    188           else
    189             git fetch -n origin $TARGET_REF
    190           fi
    191           git reset --hard $TARGET_SHA
    192 
    193       - name: Set up Node.js
    194         uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
    195         with:
    196           node-version-file: '.nvmrc'
    197           cache: npm
    198 
    199       - name: Install npm dependencies
    200         run: npm ci
    201 
    202       - name: Build WordPress
    203         run: npm run build
    204 
    205       - name: Run any database upgrades
    206         run: npm run env:cli -- core update-db --path=/var/www/${{ env.LOCAL_DIR }}
    207 
    208       - name: Run target performance tests (base/previous commit)
    209         env:
    210           TEST_RESULTS_PREFIX: before
    211         run: npm run test:performance
    212 
    213       - name: Print target performance tests results
    214         env:
    215           TEST_RESULTS_PREFIX: before
    216         run: node ./tests/performance/results.js
    217 
    218       - name: Reset to original commit
    219         run: git reset --hard $GITHUB_SHA
    220 
    221       - name: Set up Node.js
    222         uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
    223         with:
    224           node-version-file: '.nvmrc'
    225           cache: npm
    226 
    227       - name: Install npm dependencies
    228         run: npm ci
    229 
    230       - name: Set the environment to the baseline version
    231         run: |
    232           npm run env:cli -- core update --version=${{ env.BASE_TAG }} --force --path=/var/www/${{ env.LOCAL_DIR }}
    233           npm run env:cli -- core version --path=/var/www/${{ env.LOCAL_DIR }}
    234 
    235       - name: Run any database upgrades
    236         run: npm run env:cli -- core update-db --path=/var/www/${{ env.LOCAL_DIR }}
    237 
    238       - name: Run baseline performance tests
    239         env:
    240           TEST_RESULTS_PREFIX: base
    241         run: npm run test:performance
    242 
    243       - name: Print baseline performance tests results
    244         env:
    245           TEST_RESULTS_PREFIX: base
    246         run: node ./tests/performance/results.js
    247 
    248       - name: Compare results with base
    249         run: node ./tests/performance/compare-results.js ${{ runner.temp }}/summary.md
    250 
    251       - name: Add workflow summary
    252         run: cat ${{ runner.temp }}/summary.md >> $GITHUB_STEP_SUMMARY
    253 
    254       - name: Set the base sha
    255         # Only needed when publishing results.
    256         if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
    257         uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
    258         id: base-sha
    259         with:
    260             github-token: ${{ secrets.GITHUB_TOKEN }}
    261             script: |
    262                 const baseRef = await github.rest.git.getRef({ owner: context.repo.owner, repo: context.repo.repo, ref: 'tags/${{ env.BASE_TAG }}' });
    263                 return baseRef.data.object.sha;
    264 
    265       - name: Set commit details
    266         # Only needed when publishing results.
    267         if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
    268         uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
    269         id: commit-timestamp
    270         with:
    271             github-token: ${{ secrets.GITHUB_TOKEN }}
    272             script: |
    273                 const commit_details = await github.rest.git.getCommit({ owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha });
    274                 return parseInt((new Date( commit_details.data.author.date ).getTime() / 1000).toFixed(0))
    275 
    276       - name: Publish performance results
    277         # Only publish results on pushes to trunk.
    278         if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' }}
    279         env:
    280             BASE_SHA: ${{ steps.base-sha.outputs.result }}
    281             COMMITTED_AT: ${{ steps.commit-timestamp.outputs.result }}
    282             CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }}
    283             HOST_NAME: "www.codevitals.run"
    284         run: node ./tests/performance/log-results.js $CODEVITALS_PROJECT_TOKEN trunk $GITHUB_SHA $BASE_SHA $COMMITTED_AT $HOST_NAME
    285 
    286       - name: Ensure version-controlled files are not modified or deleted
    287         run: git diff --exit-code
    28840
    28941  slack-notifications:
  • branches/6.5/.github/workflows/php-compatibility.yml

    r57757 r58166  
    4141
    4242jobs:
    43 
    4443  # 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.
    5844  php-compatibility:
    5945    name: Check PHP compatibility
    60     runs-on: ubuntu-latest
     46    uses: WordPress/wordpress-develop/.github/workflows/reusable-php-compatibility.yml@trunk
    6147    permissions:
    6248      contents: read
    63     timeout-minutes: 20
    6449    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    65 
    66     steps:
    67       - name: Checkout repository
    68         uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
    69         with:
    70           show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
    71 
    72       - name: Set up PHP
    73         uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2.30.0
    74         with:
    75           php-version: '7.4'
    76           coverage: none
    77           tools: cs2pr
    78 
    79       - name: Log debug information
    80         run: |
    81           composer --version
    82 
    83       # This date is used to ensure that the PHP compatibility cache is cleared at least once every week.
    84       # http://man7.org/linux/man-pages/man1/date.1.html
    85       - name: "Get last Monday's date"
    86         id: get-date
    87         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    88 
    89       - name: Cache PHP compatibility scan cache
    90         uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
    91         with:
    92           path: .cache/phpcompat.json
    93           key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }}
    94 
    95       # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
    96       # passing a custom cache suffix ensures that the cache is flushed at least once per week.
    97       - name: Install Composer dependencies
    98         uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
    99         with:
    100           custom-cache-suffix: ${{ steps.get-date.outputs.date }}
    101 
    102       - name: Make Composer packages available globally
    103         run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    104 
    105       - name: Run PHP compatibility tests
    106         id: phpcs
    107         run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml
    108 
    109       - name: Show PHPCompatibility results in PR
    110         if: ${{ always() && steps.phpcs.outcome == 'failure' }}
    111         run: cs2pr ./.cache/phpcs-compat-report.xml
    112 
    113       - name: Ensure version-controlled files are not modified or deleted
    114         run: git diff --exit-code
    11550
    11651  slack-notifications:
  • branches/6.5/.github/workflows/phpunit-tests.yml

    r57379 r58166  
    3232
    3333jobs:
    34   #
    3534  # Creates a PHPUnit test job for each PHP/MySQL combination.
    36   #
    3735  test-with-mysql:
    3836    name: PHP ${{ matrix.php }}
    39     uses: WordPress/wordpress-develop/.github/workflows/phpunit-tests-run.yml@trunk
     37    uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests.yml@trunk
    4038    permissions:
    4139      contents: read
     
    8482      report: ${{ matrix.report || false }}
    8583
    86   #
    8784  # Creates a PHPUnit test job for each PHP/MariaDB combination.
    88   #
    8985  test-with-mariadb:
    9086    name: PHP ${{ matrix.php }}
    91     uses: WordPress/wordpress-develop/.github/workflows/phpunit-tests-run.yml@trunk
     87    uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests.yml@trunk
    9288    permissions:
    9389      contents: read
  • branches/6.5/.github/workflows/test-build-processes.yml

    r57655 r58166  
    3232  test-core-build-process:
    3333    name: Core running from ${{ matrix.directory }}
    34     uses: WordPress/wordpress-develop/.github/workflows/callable-test-core-build-process.yml@trunk
     34    uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk
    3535    permissions:
    3636      contents: read
     
    5555  test-core-build-process-macos:
    5656    name: Core running from ${{ matrix.directory }}
    57     uses: WordPress/wordpress-develop/.github/workflows/callable-test-core-build-process.yml@trunk
     57    uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk
    5858    permissions:
    5959      contents: read
     
    7171  test-gutenberg-build-process:
    7272    name: Gutenberg running from ${{ matrix.directory }}
    73     uses: WordPress/wordpress-develop/.github/workflows/callable-test-gutenberg-build-process.yml@trunk
     73    uses: WordPress/wordpress-develop/.github/workflows/reusable-test-gutenberg-build-process.yml@trunk
    7474    permissions:
    7575      contents: read
     
    9494  test-gutenberg-build-process-macos:
    9595    name: Gutenberg running from ${{ matrix.directory }}
    96     uses: WordPress/wordpress-develop/.github/workflows/callable-test-gutenberg-build-process.yml@trunk
     96    uses: WordPress/wordpress-develop/.github/workflows/reusable-test-gutenberg-build-process.yml@trunk
    9797    permissions:
    9898      contents: read
Note: See TracChangeset for help on using the changeset viewer.