Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/02/2024 10:45:11 PM (3 months ago)
Author:
espellcaste
Message:

Raise the minimum supported WordPress and PHP versions.

The new minimum WordPress version supported is 6.4.
The new minimum PHP version supported is 7.0.

Props imath.
Fixes #9225

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/unit-tests.yml

    r13969 r14014  
    1 name: Unit Tests
    2 
    3 on:
    4   pull_request:
    5     paths-ignore:
    6       - 'docs/**'
    7   push:
    8     branches: [ master ]
    9     paths-ignore:
    10       - 'docs/**'
    11 
    12 jobs:
    13   tests:
    14     name: "WP: ${{ matrix.wp_version }} - PHP: ${{ matrix.php }}"
    15     runs-on: ubuntu-latest
    16     strategy:
    17       fail-fast: false
    18       matrix:
    19         php: ['7.4', '8.0', '8.1', '8.2', '8.3']
    20         wp_version: ['master']
    21         include:
    22           - php: '8.0'
    23             wp_version: 'latest'
    24           - php: '7.4'
    25             wp_version: 'latest'
    26           - php: '7.4'
    27             wp_version: '6.1'
    28     env:
    29       WP_ENV_PHP_VERSION: ${{ matrix.php }}
    30       WP_VERSION: ${{ matrix.wp_version }}
    31 
    32     steps:
    33       - name: Cancel previous runs of this workflow
    34         uses: styfle/cancel-workflow-action@0.12.1
    35         with:
    36           access_token: ${{ github.token }}
    37 
    38       - name: Checkout repository
    39         uses: actions/checkout@v4
    40 
    41       - name: Check Gitignored files
    42         run: if [[ ! -z $(git ls-files -i --exclude-standard) ]]; then exit 1; fi
    43 
    44       - name: Setup PHP
    45         uses: shivammathur/setup-php@v2
    46         with:
    47           php-version: ${{ matrix.php }}
    48           extensions: gd, imagick, mysql, zip
    49           coverage: none
    50           tools: composer:v2
    51 
    52       - name: Set up Node.js
    53         uses: actions/setup-node@v4
    54         with:
    55           node-version: '>=20.10.0'
    56 
    57       - name: Log information
    58         run: |
    59           echo "$GITHUB_REF"
    60           echo "$GITHUB_EVENT_NAME"
    61           npm --version
    62           node --version
    63           git --version
    64           php --version
    65           composer --version
    66 
    67       - name: Install Composer dependencies
    68         uses: ramsey/composer-install@v3
    69 
    70       - name: Cache node modules
    71         uses: actions/cache@v4
    72         env:
    73           cache-name: cache-node-modules
    74         with:
    75           # npm cache files are stored in `~/.npm` on Linux/macOS
    76           path: ~/.npm
    77           key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
    78           restore-keys: |
    79             ${{ runner.os }}-build-${{ env.cache-name }}-
    80             ${{ runner.os }}-build-
    81             ${{ runner.os }}-
    82 
    83       - name: Validate node modules
    84         run: if [[ -f package.json ]]; then npm audit --audit-level=high --production --cache ~/.npm; fi
    85 
    86       - name: Install node modules
    87         run: npm ci --cache ~/.npm
    88 
    89       - name: Setup WordPress
    90         run: |
    91           if [ ${{ env.WP_VERSION }} == 'latest' ]; then
    92             echo "{\"core\":null}" >> .wp-env.override.json
    93           else
    94             echo "{\"core\":\"WordPress/WordPress#${WP_VERSION}\"}" >> .wp-env.override.json
    95           fi
    96 
    97       - name: Install WordPress
    98         run: |
    99           chmod -R 767 ./
    100           npm run wp-env start -- --update
    101 
    102       - name: Running single site unit tests
    103         if: ${{ success() || failure() }}
    104         run: npm run test-php
    105 
    106       - name: Running multi site unit tests
    107         if: ${{ success() || failure() }}
    108         run: npm run test-php-multisite
    109 
    110       - name: Stop Docker environment
    111         if: ${{ success() || failure() }}
    112         run: npm run wp-env stop
Note: See TracChangeset for help on using the changeset viewer.