Make WordPress Core

Changeset 54851


Ignore:
Timestamp:
11/16/2022 07:32:57 PM (2 years ago)
Author:
desrosj
Message:

Build/Test Tools: Various minor GitHub Action improvements.

This applies several types of improvements to GitHub Action workflows:

  • Updates to inline documentation to ensure accuracy.
  • Removal of repetitive or unnecessary debug logging.
  • Reorganization of some steps to have configuration steps towards the beginning of jobs.
  • Step name updates for consistency across workflows.

Props desrosj, jrf.
See #56793.

Location:
trunk/.github/workflows
Files:
8 edited

Legend:

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

    r54750 r54851  
    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.
     59
    5960  phpcs:
    6061    name: PHP coding standards
     
    7475          tools: composer, cs2pr
    7576
    76       - name: Log debug information
    77         run: |
    78           php --version
    79           composer --version
    80 
    8177      # This date is used to ensure that the PHPCS cache is cleared at least once every week.
    8278      # http://man7.org/linux/man-pages/man1/date.1.html
     
    9995        run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    10096
    101       - name: Log PHPCS debug information
    102         run: phpcs -i
    103 
    10497      - name: Run PHPCS on all Core files
    10598        id: phpcs-core
     
    127120  # Performs the following steps:
    128121  # - Checks out the repository.
     122  # - Sets up Node.js.
    129123  # - Logs debug information about the GitHub Action runner.
    130   # - Installs Node.js.
    131   # - Logs updated debug information.
    132   # _ Installs npm dependencies.
     124  # - Installs npm dependencies.
    133125  # - Run the WordPress JSHint checks.
    134126  # - Ensures version-controlled files are not modified or deleted.
     
    145137        uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
    146138
     139      - name: Set up Node.js
     140        uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
     141        with:
     142          node-version-file: '.nvmrc'
     143          cache: npm
     144
    147145      - name: Log debug information
    148146        run: |
     
    152150          svn --version
    153151
    154       - name: Install Node.js
    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
     152      - name: Install npm Dependencies
    166153        run: npm ci
    167154
  • trunk/.github/workflows/end-to-end-tests.yml

    r54674 r54851  
    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 Node.js.
    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).
     
    6261        uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
    6362
     63      - name: Set up Node.js
     64        uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
     65        with:
     66          node-version-file: '.nvmrc'
     67          cache: npm
     68
    6469      - name: Log debug information
    6570        run: |
     
    6974          git --version
    7075          svn --version
    71           php --version
    72           php -i
    7376          locale -a
    7477
    75       - name: Install Node.js
    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
  • trunk/.github/workflows/javascript-tests.yml

    r54674 r54851  
    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 Node.js.
    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.
     
    6059        uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
    6160
    62       - name: Log debug information
    63         run: |
    64           npm --version
    65           node --version
    66           git --version
    67           svn --version
    68 
    69       - name: Install Node.js
     61      - name: Set up Node.js
    7062        uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    7163        with:
     
    7769          npm --version
    7870          node --version
     71          git --version
     72          svn --version
    7973
    80       - name: Install Dependencies
     74      - name: Install npm Dependencies
    8175        run: npm ci
    8276
  • trunk/.github/workflows/php-compatibility.yml

    r54750 r54851  
    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:
     
    7171      - name: Log debug information
    7272        run: |
    73           php --version
    7473          composer --version
    7574
     
    9392      - name: Make Composer packages available globally
    9493        run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    95 
    96       - name: Log PHPCS debug information
    97         run: phpcs -i
    9894
    9995      - name: Run PHP compatibility tests
  • trunk/.github/workflows/phpunit-tests.yml

    r54674 r54851  
    3737  # Performs the following steps:
    3838  # - Sets environment variables.
    39   # - Sets up the environment variables needed for testing with memcached (if desired).
    40   # - Installs Node.js.
     39  # - Checks out the repository.
     40  # - Sets up Node.js.
     41  # - Logs general debug information about the runner.
    4142  # - Installs npm dependencies
    4243  # - Configures caching for Composer.
     
    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:
     
    109107        uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
    110108
    111       - name: Install Node.js
     109      - name: Set up Node.js
    112110        uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    113111        with:
     
    115113          cache: npm
    116114
    117       - name: Install Dependencies
     115      - name: General debug information
     116        run: |
     117          npm --version
     118          node --version
     119          curl --version
     120          git --version
     121          svn --version
     122
     123      - name: Install npm dependencies
    118124        run: npm ci
    119125
     
    155161        run: |
    156162          npm run env:start
    157 
    158       - name: General debug information
    159         run: |
    160           npm --version
    161           node --version
    162           curl --version
    163           git --version
    164           svn --version
    165163
    166164      - name: Log running Docker containers
  • trunk/.github/workflows/test-and-zip-default-themes.yml

    r54740 r54851  
    5050  # Performs the following steps:
    5151  # - Checks out the repository.
    52   # - Installs Node.js (only when theme has a build process)
    53   # - Installs npm dependencies (only when theme has a build process)
    54   # - Runs the theme build script (only when theme has a build process)
     52  # - Sets up Node.js.
     53  # - Installs npm dependencies.
     54  # - Runs the theme build script.
    5555  # - Ensures version-controlled files are not modified or deleted.
    5656  test-build-scripts:
     
    7878          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref }}
    7979
    80       - name: Install Node.js
     80      - name: Set up Node.js
    8181        uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    8282        with:
  • trunk/.github/workflows/test-coverage.yml

    r54674 r54851  
    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 Node.js.
    43   # _ Installs npm dependencies.
     40  # - Sets up Node.js.
     41  # - Logs general debug information about the runner.
     42  # - Installs npm dependencies
     43  # - Configures caching for Composer.
     44  # - Installs Composer dependencies.
    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.
     
    7473        uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
    7574
     75      - name: Set up Node.js
     76        uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
     77        with:
     78          node-version-file: '.nvmrc'
     79          cache: npm
     80
    7681      - name: Log debug information
    7782        run: |
     
    8388          git --version
    8489          svn --version
    85           php --version
    86           php -i
    8790          locale -a
    8891
    89       - name: Install Node.js
    90         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    91         with:
    92           node-version-file: '.nvmrc'
    93           cache: npm
    94 
    95       - name: Install Dependencies
     92      - name: Install npm Dependencies
    9693        run: npm ci
    9794
     
    129126        run: |
    130127          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
    139128
    140129      - name: Log running Docker containers
  • trunk/.github/workflows/test-npm.yml

    r54674 r54851  
    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 Node.js.
    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.
     
    6565        uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
    6666
     67      - name: Set up Node.js
     68        uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
     69        with:
     70          node-version-file: '.nvmrc'
     71          cache: npm
     72
    6773      - name: Log debug information
    6874        run: |
     
    7379          svn --version
    7480
    75       - name: Install Node.js
    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
     
    107107  # Performs the following steps:
    108108  # - Checks out the repository.
     109  # - Sets up Node.js.
    109110  # - Logs debug information about the GitHub Action runner.
    110   # - Installs Node.js.
    111   # _ Installs npm dependencies.
     111  # - Installs npm dependencies.
    112112  # - Builds WordPress to run from the `build` directory.
    113113  # - Cleans up after building WordPress to the `build` directory.
     
    125125        uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
    126126
     127      - name: Set up Node.js
     128        uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
     129        with:
     130          node-version-file: '.nvmrc'
     131          cache: npm
     132
    127133      - name: Log debug information
    128134        run: |
     
    133139          svn --version
    134140
    135       - name: Install Node.js
    136         uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.1
    137         with:
    138           node-version-file: '.nvmrc'
    139           cache: npm
    140 
    141       - name: Install Dependencies
     141      - name: Install npm Dependencies
    142142        run: npm ci
    143143
Note: See TracChangeset for help on using the changeset viewer.