Changeset 54856 for trunk/.github/workflows/phpunit-tests.yml
- Timestamp:
- 11/18/2022 02:50:52 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/.github/workflows/phpunit-tests.yml (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/phpunit-tests.yml
r54851 r54856 39 39 # - Checks out the repository. 40 40 # - Sets up Node.js. 41 # - Sets up PHP. 42 # - Installs Composer dependencies. 43 # - Installs npm dependencies 41 44 # - Logs general debug information about the runner. 42 # - Installs npm dependencies43 # - Configures caching for Composer.44 # - Installs Composer dependencies.45 45 # - Logs Docker debug information (about the Docker installation within the runner). 46 46 # - Starts the WordPress Docker container. … … 113 113 cache: npm 114 114 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@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2.22.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 136 run: npm ci 137 115 138 - name: General debug information 116 139 run: | … … 120 143 git --version 121 144 svn --version 122 123 - name: Install npm dependencies 124 run: npm ci 125 126 # This date is used to ensure that the Composer cache is refreshed at least once every week. 127 # http://man7.org/linux/man-pages/man1/date.1.html 128 - name: "Get last Monday's date" 129 id: get-date 130 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT 131 132 - name: Get Composer cache directory 133 id: composer-cache 134 run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT 135 136 - name: Cache Composer dependencies 137 uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11 138 env: 139 cache-name: cache-composer-dependencies 140 with: 141 path: ${{ steps.composer-cache.outputs.composer_dir }} 142 key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }} 143 144 - name: Install Composer dependencies 145 run: | 146 docker-compose run --rm php composer --version 147 148 # Install using `composer update` as there is no `composer.lock` file. 149 if [ ${{ env.LOCAL_PHP }} == '8.2-fpm' ]; then 150 docker-compose run --rm php composer update --ignore-platform-req=php+ 151 else 152 docker-compose run --rm php composer update 153 fi 145 composer --version 146 locale -a 154 147 155 148 - name: Docker debug information
Note: See TracChangeset
for help on using the changeset viewer.