Make WordPress Core

Changeset 55357


Ignore:
Timestamp:
02/17/2023 07:51:16 AM (14 months ago)
Author:
desrosj
Message:

Build/Test Tools: Backport updates to GitHub Actions.

This backports updates to GitHub Actions workflows required to address deprecated notices related to save-output and set-output.

Merges [54650], [54750], [54851], [54852], [54856], and [55152] to the 6.1 branch.
See #56882, #56820.

Location:
branches/6.1/.github/workflows
Files:
9 edited

Legend:

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

    r54681 r55357  
    2222      - '**.js'
    2323      - '**.php'
    24       # These files configure NPM. Changes could affect the outcome.
     24      # These files configure npm. Changes could affect the outcome.
    2525      - 'package*.json'
    2626      # These files configure Composer. Changes could affect the outcome.
     
    4949  # - Checks out the repository.
    5050  # - Sets up PHP.
    51   # - Logs debug information.
    5251  # - Configures caching for PHPCS scans.
    53   # - Installs Composer dependencies (use cache if possible).
     52  # - Installs Composer dependencies.
    5453  # - Make Composer packages available globally.
    55   # - Logs PHP_CodeSniffer debug information.
    5654  # - Runs PHPCS on the full codebase with warnings suppressed.
     55  # - Generate a report for displaying issues as pull request annotations.
    5756  # - Runs PHPCS on the `tests` directory without warnings suppressed.
     57  # - Generate a report for displaying `test` directory issues as pull request annotations.
    5858  # - Ensures version-controlled files are not modified or deleted.
    5959  phpcs:
     
    6565    steps:
    6666      - name: Checkout repository
    67         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
     67        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    6868
    6969      - name: Set up PHP
    70         uses: shivammathur/setup-php@e04e1d97f0c0481c6e1ba40f8a538454fe5d7709 # v2.21.2
     70        uses: shivammathur/setup-php@8e2ac35f639d3e794c1da1f28999385ab6fdf0fc # v2.23.0
    7171        with:
    7272          php-version: '7.4'
    7373          coverage: none
    74           tools: composer, cs2pr
    75 
    76       - name: Log debug information
    77         run: |
    78           php --version
    79           composer --version
     74          tools: cs2pr
    8075
    8176      # This date is used to ensure that the PHPCS cache is cleared at least once every week.
     
    8681
    8782      - name: Cache PHPCS scan cache
    88         uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
     83        uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3.2.3
    8984        with:
    9085          path: .cache/phpcs.json
    9186          key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
    9287
     88      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
     89      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
    9390      - name: Install Composer dependencies
    94         uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
    95         with:
    96           composer-options: "--no-progress --no-ansi"
     91        uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
     92        with:
     93          custom-cache-suffix: ${{ steps.get-date.outputs.date }}
    9794
    9895      - name: Make Composer packages available globally
    9996        run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    100 
    101       - name: Log PHPCS debug information
    102         run: phpcs -i
    10397
    10498      - name: Run PHPCS on all Core files
     
    127121  # Performs the following steps:
    128122  # - Checks out the repository.
     123  # - Sets up Node.js.
    129124  # - Logs debug information about the GitHub Action runner.
    130   # - Installs NodeJS.
    131   # - Logs updated debug information.
    132   # _ Installs NPM dependencies.
     125  # - Installs npm dependencies.
    133126  # - Run the WordPress JSHint checks.
    134127  # - Ensures version-controlled files are not modified or deleted.
     
    143136    steps:
    144137      - name: Checkout repository
    145         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
     138        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
     139
     140      - name: Set up Node.js
     141        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
     142        with:
     143          node-version-file: '.nvmrc'
     144          cache: npm
    146145
    147146      - name: Log debug information
     
    152151          svn --version
    153152
    154       - name: Install NodeJS
    155         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    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 
    165       - name: Install Dependencies
     153      - name: Install npm Dependencies
    166154        run: npm ci
    167155
     
    201189    steps:
    202190      - name: Dispatch workflow run
    203         uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
     191        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    204192        with:
    205193          retries: 2
  • branches/6.1/.github/workflows/end-to-end-tests.yml

    r54680 r55357  
    3636  # - Sets environment variables.
    3737  # - Checks out the repository.
     38  # - Sets up Node.js.
    3839  # - Logs debug information about the GitHub Action runner.
    39   # - Installs NodeJS.
    40   # _ Installs NPM dependencies.
     40  # - Installs npm dependencies.
    4141  # - Builds WordPress to run from the `build` directory.
    4242  # - Starts the WordPress Docker container.
    43   # - Logs general debug information.
    4443  # - Logs the running Docker containers.
    4544  # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).
     
    6059
    6160      - name: Checkout repository
    62         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
     61        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
     62
     63      - name: Set up Node.js
     64        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
     65        with:
     66          node-version-file: '.nvmrc'
     67          cache: npm
    6368
    6469      - name: Log debug information
     
    6974          git --version
    7075          svn --version
    71           php --version
    72           php -i
    7376          locale -a
    7477
    75       - name: Install NodeJS
    76         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    77         with:
    78           node-version-file: '.nvmrc'
    79           cache: npm
    80 
    81       - name: Install Dependencies
     78      - name: Install npm Dependencies
    8279        run: npm ci
    8380
     
    8885        run: |
    8986          npm run env:start
    90 
    91       - name: General debug information
    92         run: |
    93           npm --version
    94           node --version
    95           curl --version
    96           git --version
    97           svn --version
    9887
    9988      - name: Log running Docker containers
     
    147136    steps:
    148137      - name: Dispatch workflow run
    149         uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
     138        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    150139        with:
    151140          retries: 2
  • branches/6.1/.github/workflows/failed-workflow.yml

    r54511 r55357  
    2525    steps:
    2626      - name: Rerun a workflow
    27         uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
     27        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    2828        with:
    2929          retries: 2
  • branches/6.1/.github/workflows/javascript-tests.yml

    r54680 r55357  
    2020      # Any change to a JavaScript file should run tests.
    2121      - '**.js'
    22       # These files configure NPM. Changes could affect the outcome.
     22      # These files configure npm. Changes could affect the outcome.
    2323      - 'package*.json'
    2424      # This file configures ESLint. Changes could affect the outcome.
     
    4444  # Performs the following steps:
    4545  # - Checks out the repository.
     46  # - Sets up Node.js.
    4647  # - Logs debug information about the GitHub Action runner.
    47   # - Installs NodeJS.
    48   # - Logs updated debug information.
    49   # _ Installs NPM dependencies.
     48  # - Installs npm dependencies.
    5049  # - Run the WordPress QUnit tests.
    5150  # - Ensures version-controlled files are not modified or deleted.
     
    5857    steps:
    5958      - name: Checkout repository
    60         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
     59        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
     60
     61      - name: Set up Node.js
     62        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
     63        with:
     64          node-version-file: '.nvmrc'
     65          cache: npm
    6166
    6267      - name: Log debug information
     
    6772          svn --version
    6873
    69       - name: Install NodeJS
    70         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    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 
    80       - name: Install Dependencies
     74      - name: Install npm Dependencies
    8175        run: npm ci
    8276
     
    115109    steps:
    116110      - name: Dispatch workflow run
    117         uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
     111        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    118112        with:
    119113          retries: 2
  • branches/6.1/.github/workflows/php-compatibility.yml

    r54681 r55357  
    4747  # - Logs debug information.
    4848  # - Configures caching for PHP compatibility scans.
    49   # - Installs Composer dependencies (use cache if possible).
     49  # - Installs Composer dependencies.
    5050  # - Make Composer packages available globally.
    51   # - Logs PHP_CodeSniffer debug information.
    5251  # - Runs the PHP compatibility tests.
     52  # - Generate a report for displaying issues as pull request annotations.
    5353  # - Ensures version-controlled files are not modified or deleted.
    5454  php-compatibility:
     
    6060    steps:
    6161      - name: Checkout repository
    62         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
     62        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    6363
    6464      - name: Set up PHP
    65         uses: shivammathur/setup-php@e04e1d97f0c0481c6e1ba40f8a538454fe5d7709 # v2.21.2
     65        uses: shivammathur/setup-php@8e2ac35f639d3e794c1da1f28999385ab6fdf0fc # v2.23.0
    6666        with:
    6767          php-version: '7.4'
    6868          coverage: none
    69           tools: composer, cs2pr
     69          tools: cs2pr
    7070
    7171      - name: Log debug information
    7272        run: |
    73           php --version
    7473          composer --version
    7574
     
    8180
    8281      - name: Cache PHP compatibility scan cache
    83         uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
     82        uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 # v3.2.3
    8483        with:
    8584          path: .cache/phpcompat.json
    8685          key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }}
    8786
     87      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
     88      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
    8889      - name: Install Composer dependencies
    89         uses: ramsey/composer-install@f680dac46551dffb2234a240d65ae806c2999dd6 # v2.1.0
     90        uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    9091        with:
    91           composer-options: "--no-progress --no-ansi"
     92          custom-cache-suffix: ${{ steps.get-date.outputs.date }}
    9293
    9394      - name: Make Composer packages available globally
    9495        run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    95 
    96       - name: Log PHPCS debug information
    97         run: phpcs -i
    9896
    9997      - name: Run PHP compatibility tests
     
    136134    steps:
    137135      - name: Dispatch workflow run
    138         uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
     136        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    139137        with:
    140138          retries: 2
  • branches/6.1/.github/workflows/phpunit-tests.yml

    r54680 r55357  
    3737  # Performs the following steps:
    3838  # - Sets environment variables.
    39   # - Sets up the environment variables needed for testing with memcached (if desired).
    40   # - Installs NodeJS.
    41   # - Installs NPM dependencies
    42   # - Configures caching for Composer.
     39  # - Checks out the repository.
     40  # - Sets up Node.js.
     41  # - Sets up PHP.
    4342  # - Installs Composer dependencies.
     43  # - Installs npm dependencies
     44  # - Logs general debug information about the runner.
    4445  # - Logs Docker debug information (about the Docker installation within the runner).
    4546  # - Starts the WordPress Docker container.
    46   # - Logs general debug information about the runner.
    4747  # - Logs the running Docker containers.
    48   # - Logs debug information from inside the WordPress Docker container.
    4948  # - Logs debug information about what's installed within the WordPress Docker containers.
    5049  # - Install WordPress within the Docker container.
     
    5251  # - Ensures version-controlled files are not modified or deleted.
    5352  # - Checks out the WordPress Test reporter repository.
    54   # - Reconnect the directory to the Git repository.
    5553  # - Submit the test results to the WordPress.org host test results.
    5654  test-php:
     
    107105
    108106      - name: Checkout repository
    109         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
    110 
    111       - name: Install NodeJS
    112         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
     107        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
     108
     109      - name: Set up Node.js
     110        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    113111        with:
    114112          node-version-file: '.nvmrc'
    115113          cache: npm
    116114
    117       - name: Install Dependencies
     115      ##
     116      # This allows Composer dependencies to be installed using a single step.
     117      #
     118      # Since the tests are currently run within the Docker containers where the PHP version varies,
     119      # the same PHP version needs to be configured for the action runner machine so that the correct
     120      # dependency versions are installed and cached.
     121      ##
     122      - name: Set up PHP
     123        uses: shivammathur/setup-php@8e2ac35f639d3e794c1da1f28999385ab6fdf0fc # v2.23.0
     124        with:
     125          php-version: '${{ matrix.php }}'
     126          coverage: none
     127
     128      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
     129      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
     130      - name: Install Composer dependencies
     131        uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
     132        with:
     133          custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")
     134
     135      - name: Install npm dependencies
    118136        run: npm ci
    119 
    120       # This date is used to ensure that the Composer cache is refreshed at least once every week.
    121       # http://man7.org/linux/man-pages/man1/date.1.html
    122       - name: "Get last Monday's date"
    123         id: get-date
    124         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    125 
    126       - name: Get Composer cache directory
    127         id: composer-cache
    128         run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
    129 
    130       - name: Cache Composer dependencies
    131         uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
    132         env:
    133           cache-name: cache-composer-dependencies
    134         with:
    135           path: ${{ steps.composer-cache.outputs.composer_dir }}
    136           key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }}
    137 
    138       - name: Install Composer dependencies
    139         run: |
    140           docker-compose run --rm php composer --version
    141 
    142           # Install using `composer update` as there is no `composer.lock` file.
    143           if [ ${{ env.LOCAL_PHP }} == '8.2-fpm' ]; then
    144             docker-compose run --rm php composer update --ignore-platform-req=php+
    145           else
    146             docker-compose run --rm php composer update
    147           fi
    148 
    149       - name: Docker debug information
    150         run: |
    151           docker -v
    152           docker-compose -v
    153 
    154       - name: Start Docker environment
    155         run: |
    156           npm run env:start
    157137
    158138      - name: General debug information
     
    163143          git --version
    164144          svn --version
     145          composer --version
     146          locale -a
     147
     148      - name: Docker debug information
     149        run: |
     150          docker -v
     151          docker-compose -v
     152
     153      - name: Start Docker environment
     154        run: |
     155          npm run env:start
    165156
    166157      - name: Log running Docker containers
     
    217208      - name: Checkout the WordPress Test Reporter
    218209        if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
    219         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
     210        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    220211        with:
    221212          repository: 'WordPress/phpunit-test-runner'
     
    256247    steps:
    257248      - name: Dispatch workflow run
    258         uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
     249        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    259250        with:
    260251          retries: 2
  • branches/6.1/.github/workflows/slack-notifications.yml

    r54679 r55357  
    5454      - name: Determine the status of the previous attempt
    5555        id: previous-attempt-result
    56         uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
     56        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    5757        with:
    5858          retries: 2
     
    119119      - name: Get the commit message
    120120        id: current-commit-message
    121         uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
     121        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    122122        if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }}
    123123        with:
  • branches/6.1/.github/workflows/test-coverage.yml

    r54680 r55357  
    3333
    3434jobs:
    35   # Sets up WordPress for testing or development use.
     35  # Runs the PHPUnit tests for WordPress.
    3636  #
    3737  # Performs the following steps:
    3838  # - Sets environment variables.
    3939  # - Checks out the repository.
    40   # - Checks out the WordPress Importer plugin (needed for the Core PHPUnit tests).
    41   # - Logs debug information about the GitHub Action runner.
    42   # - Installs NodeJS.
    43   # _ Installs NPM dependencies.
     40  # - Sets up Node.js.
     41  # - Sets up PHP.
     42  # - Installs Composer dependencies.
     43  # - Installs npm dependencies
     44  # - Logs general debug information about the runner.
    4445  # - Logs Docker debug information (about the Docker installation within the runner).
    4546  # - Starts the WordPress Docker container.
    46   # - Logs debug general information.
    4747  # - Logs the running Docker containers.
    48   # - Logs WordPress Docker container debug information.
    4948  # - Logs debug information about what's installed within the WordPress Docker containers.
    5049  # - Install WordPress within the Docker container.
     
    5251  # - Ensures version-controlled files are not modified or deleted.
    5352  # - Upload the single site code coverage report to Codecov.io.
    54   # - Run the PHPUnit tests as a multisite.
     53  # - Run the PHPUnit tests as a multisite installation.
    5554  # - Ensures version-controlled files are not modified or deleted.
    5655  # - Upload the multisite code coverage report to Codecov.io.
     
    7271
    7372      - name: Checkout repository
    74         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
     73        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
     74
     75      - name: Set up Node.js
     76        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
     77        with:
     78          node-version-file: '.nvmrc'
     79          cache: npm
     80
     81      ##
     82      # This allows Composer dependencies to be installed using a single step.
     83      #
     84      # Since the tests are currently run within the Docker containers where the PHP version varies,
     85      # the same PHP version needs to be configured for the action runner machine so that the correct
     86      # dependency versions are installed and cached.
     87      ##
     88      - name: Set up PHP
     89        uses: shivammathur/setup-php@8e2ac35f639d3e794c1da1f28999385ab6fdf0fc # v2.23.0
     90        with:
     91          php-version: '7.4'
     92          coverage: none
     93
     94      # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
     95      # passing a custom cache suffix ensures that the cache is flushed at least once per week.
     96      - name: Install Composer dependencies
     97        uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
     98        with:
     99          custom-cache-suffix: $(/bin/date -u --date='last Mon' "+%F")
     100
     101      - name: Install npm Dependencies
     102        run: npm ci
    75103
    76104      - name: Log debug information
     
    83111          git --version
    84112          svn --version
    85           php --version
    86           php -i
     113          composer --version
    87114          locale -a
    88 
    89       - name: Install NodeJS
    90         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    91         with:
    92           node-version-file: '.nvmrc'
    93           cache: npm
    94 
    95       - name: Install Dependencies
    96         run: npm ci
    97 
    98       # This date is used to ensure that the Composer cache is refreshed at least once every week.
    99       # http://man7.org/linux/man-pages/man1/date.1.html
    100       - name: "Get last Monday's date"
    101         id: get-date
    102         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    103 
    104       - name: Get Composer cache directory
    105         id: composer-cache
    106         run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
    107 
    108       - name: Cache Composer dependencies
    109         uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
    110         env:
    111           cache-name: cache-composer-dependencies
    112         with:
    113           path: ${{ steps.composer-cache.outputs.composer_dir }}
    114           key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }}
    115 
    116       - name: Install Composer dependencies
    117         run: |
    118           docker-compose run --rm php composer --version
    119 
    120           # Install using `composer update` as there is no `composer.lock` file.
    121           docker-compose run --rm php composer update
    122115
    123116      - name: Docker debug information
     
    129122        run: |
    130123          npm run env:start
    131 
    132       - name: General debug information
    133         run: |
    134           npm --version
    135           node --version
    136           curl --version
    137           git --version
    138           svn --version
    139124
    140125      - name: Log running Docker containers
     
    210195    steps:
    211196      - name: Dispatch workflow run
    212         uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
     197        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    213198        with:
    214199          retries: 2
  • branches/6.1/.github/workflows/test-npm.yml

    r54680 r55357  
    1 name: Test NPM
     1name: Test npm
    22
    33on:
     
    1616      - '[4-9].[0-9]'
    1717    paths:
    18       # These files configure NPM. Changes could affect the outcome.
     18      # These files configure npm. Changes could affect the outcome.
    1919      - 'package*.json'
    20       # JavaScript files are built using NPM.
     20      # JavaScript files are built using npm.
    2121      - '**.js'
    22       # CSS and SCSS files are built using NPM.
     22      # CSS and SCSS files are built using npm.
    2323      - '**.scss'
    2424      - '**.css'
     
    3838
    3939jobs:
    40   # Verifies that installing NPM dependencies and building WordPress works as expected.
     40  # Verifies that installing npm dependencies and building WordPress works as expected.
    4141  #
    4242  # Performs the following steps:
    4343  # - Checks out the repository.
     44  # - Sets up Node.js.
    4445  # - Logs debug information about the GitHub Action runner.
    45   # - Installs NodeJS.
    46   # _ Installs NPM dependencies.
     46  # - Installs npm dependencies.
    4747  # - Builds WordPress to run from the `build` directory.
    4848  # - Cleans up after building WordPress to the `build` directory.
     
    5252  # - Ensures version-controlled files are not modified or deleted.
    5353  test-npm:
    54     name: Test NPM on ${{ matrix.os }}
     54    name: Test npm on ${{ matrix.os }}
    5555    runs-on: ${{ matrix.os }}
    5656    timeout-minutes: 20
     
    6363    steps:
    6464      - name: Checkout repository
    65         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
     65        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
     66
     67      - name: Set up Node.js
     68        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
     69        with:
     70          node-version-file: '.nvmrc'
     71          cache: npm
    6672
    6773      - name: Log debug information
     
    7379          svn --version
    7480
    75       - name: Install NodeJS
    76         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    77         with:
    78           node-version-file: '.nvmrc'
    79           cache: npm
    80 
    81       - name: Install Dependencies
     81      - name: Install npm Dependencies
    8282        run: npm ci
    8383
     
    100100        run: git diff --exit-code
    101101
    102   # Verifies that installing NPM dependencies and building WordPress works as expected on MacOS.
     102  # Verifies that installing npm dependencies and building WordPress works as expected on MacOS.
    103103  #
    104104  # This is separate from the job above in order to use stricter conditions about when to run.
    105105  # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate.
    106106  #
     107  # The `matrix` and `runner` contexts are not available for use within `if` expressions. So there is
     108  # currently no way to determine the OS being used on a given job.
     109  # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
     110  #
    107111  # Performs the following steps:
    108112  # - Checks out the repository.
     113  # - Sets up Node.js.
    109114  # - Logs debug information about the GitHub Action runner.
    110   # - Installs NodeJS.
    111   # _ Installs NPM dependencies.
     115  # - Installs npm dependencies.
    112116  # - Builds WordPress to run from the `build` directory.
    113117  # - Cleans up after building WordPress to the `build` directory.
     
    117121  # - Ensures version-controlled files are not modified or deleted.
    118122  test-npm-macos:
    119     name: Test NPM on MacOS
     123    name: Test npm on MacOS
    120124    runs-on: macos-latest
    121125    timeout-minutes: 30
     
    123127    steps:
    124128      - name: Checkout repository
    125         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
     129        uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
     130
     131      - name: Set up Node.js
     132        uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
     133        with:
     134          node-version-file: '.nvmrc'
     135          cache: npm
    126136
    127137      - name: Log debug information
     
    133143          svn --version
    134144
    135       - name: Install NodeJS
    136         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    137         with:
    138           node-version-file: '.nvmrc'
    139           cache: npm
    140 
    141       - name: Install Dependencies
     145      - name: Install npm Dependencies
    142146        run: npm ci
    143147
     
    189193    steps:
    190194      - name: Dispatch workflow run
    191         uses: actions/github-script@100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2
     195        uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
    192196        with:
    193197          retries: 2
Note: See TracChangeset for help on using the changeset viewer.