Changeset 55357 for branches/6.1/.github/workflows/phpunit-tests.yml
- Timestamp:
- 02/17/2023 07:51:16 AM (3 years ago)
- File:
-
- 1 edited
-
branches/6.1/.github/workflows/phpunit-tests.yml (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.1/.github/workflows/phpunit-tests.yml
r54680 r55357 37 37 # Performs the following steps: 38 38 # - 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. 43 42 # - Installs Composer dependencies. 43 # - Installs npm dependencies 44 # - Logs general debug information about the runner. 44 45 # - Logs Docker debug information (about the Docker installation within the runner). 45 46 # - Starts the WordPress Docker container. 46 # - Logs general debug information about the runner.47 47 # - Logs the running Docker containers. 48 # - Logs debug information from inside the WordPress Docker container.49 48 # - Logs debug information about what's installed within the WordPress Docker containers. 50 49 # - Install WordPress within the Docker container. … … 52 51 # - Ensures version-controlled files are not modified or deleted. 53 52 # - Checks out the WordPress Test reporter repository. 54 # - Reconnect the directory to the Git repository.55 53 # - Submit the test results to the WordPress.org host test results. 56 54 test-php: … … 107 105 108 106 - name: Checkout repository 109 uses: actions/checkout@ 93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0110 111 - name: Install NodeJS112 uses: actions/setup-node@ 8c91899e586c5b171469028077307d293428b516 # v3.5.1107 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 108 109 - name: Set up Node.js 110 uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 113 111 with: 114 112 node-version-file: '.nvmrc' 115 113 cache: npm 116 114 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 118 136 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.html122 - name: "Get last Monday's date"123 id: get-date124 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT125 126 - name: Get Composer cache directory127 id: composer-cache128 run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT129 130 - name: Cache Composer dependencies131 uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11132 env:133 cache-name: cache-composer-dependencies134 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 dependencies139 run: |140 docker-compose run --rm php composer --version141 142 # Install using `composer update` as there is no `composer.lock` file.143 if [ ${{ env.LOCAL_PHP }} == '8.2-fpm' ]; then144 docker-compose run --rm php composer update --ignore-platform-req=php+145 else146 docker-compose run --rm php composer update147 fi148 149 - name: Docker debug information150 run: |151 docker -v152 docker-compose -v153 154 - name: Start Docker environment155 run: |156 npm run env:start157 137 158 138 - name: General debug information … … 163 143 git --version 164 144 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 165 156 166 157 - name: Log running Docker containers … … 217 208 - name: Checkout the WordPress Test Reporter 218 209 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }} 219 uses: actions/checkout@ 93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0210 uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 220 211 with: 221 212 repository: 'WordPress/phpunit-test-runner' … … 256 247 steps: 257 248 - name: Dispatch workflow run 258 uses: actions/github-script@ 100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2249 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 259 250 with: 260 251 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.