Make WordPress Core


Ignore:
Timestamp:
02/17/2023 07:51:16 AM (3 years 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.