WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/12/2021 07:16:28 PM (10 months ago)
Author:
desrosj
Message:

Build/Test Tools: Restore automated testing in the 5.1 branch.

This commit merges the workflow files required to run automated testing on GitHub Actions.

In addition, [49836] and [50285] have been included in order to keep the local Docker environment consistent across all branches.

Merges [49162,49168-49169,49175,49204,49227-49228,49244,49369,49371,49548,49781-49784,49786,49836,49938,50268,50285,50298] to the 5.1 branch.
See #50401.

Location:
branches/5.1
Files:
1 added
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/5.1

  • branches/5.1/.github/workflows/php-compatibility.yml

    r49162 r50306  
    77      # The PHP compatibility testing was introduced in WordPress 5.5.
    88      - '5.[5-9]'
    9       - '[6-9].*'
     9      - '[6-9].[0-9]'
     10    tags:
     11      - '5.[5-9]*'
     12      - '[6-9].[0-9]*'
    1013  pull_request:
    1114
     
    1821  # Performs the following steps:
    1922  # - Checks out the repository.
    20   # - Configures caching for Composer.
    2123  # - Sets up PHP.
    2224  # - Logs debug information about the runner container.
    23   # - Installs Composer dependencies (from cache if possible).
     25  # - Installs Composer dependencies (use cache if possible).
     26  # - Make Composer packages available globally.
    2427  # - Logs PHP_CodeSniffer debug information.
    2528  # - Runs the PHP compatibility tests.
     
    2831    name: Check PHP compatibility
    2932    runs-on: ubuntu-latest
     33    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    3034
    3135    steps:
    3236      - name: Checkout repository
    3337        uses: actions/checkout@v2
    34 
    35       - name: Get Composer cache directory
    36         id: composer-cache
    37         run: echo "::set-output name=dir::$(composer config cache-files-dir)"
    38 
    39       - name: Set up Composer caching
    40         uses: actions/cache@v2
    41         env:
    42           cache-name: cache-composer-dependencies
    43         with:
    44           path: ${{ steps.composer-cache.outputs.dir }}
    45           key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
    46           restore-keys: |
    47             ${{ runner.os }}-composer-
    4838
    4939      - name: Set up PHP
     
    6050
    6151      - name: Install Composer dependencies
    62         run: |
    63           composer install --prefer-dist --no-suggest --no-progress --no-ansi --no-interaction
    64           echo "vendor/bin" >> $GITHUB_PATH
     52        uses: ramsey/composer-install@v1
     53        with:
     54          composer-options: "--no-progress --no-ansi --no-interaction"
     55
     56      - name: Make Composer packages available globally
     57        run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
     58
     59      - name: Log PHPCS debug information
     60        run: phpcs -i
    6561
    6662      - name: Run PHP compatibility tests
    67         run: vendor/bin/phpcs --standard=phpcompat.xml.dist -q --report=checkstyle | cs2pr
     63        run: phpcs --standard=phpcompat.xml.dist -q --report=checkstyle | cs2pr
Note: See TracChangeset for help on using the changeset viewer.