Changeset 55357 for branches/6.1/.github/workflows/test-coverage.yml
- Timestamp:
- 02/17/2023 07:51:16 AM (3 years ago)
- File:
-
- 1 edited
-
branches/6.1/.github/workflows/test-coverage.yml (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.1/.github/workflows/test-coverage.yml
r54680 r55357 33 33 34 34 jobs: 35 # Sets up WordPress for testing or development use.35 # Runs the PHPUnit tests for WordPress. 36 36 # 37 37 # Performs the following steps: 38 38 # - Sets environment variables. 39 39 # - 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. 44 45 # - Logs Docker debug information (about the Docker installation within the runner). 45 46 # - Starts the WordPress Docker container. 46 # - Logs debug general information.47 47 # - Logs the running Docker containers. 48 # - Logs WordPress Docker container debug information.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 # - 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. 55 54 # - Ensures version-controlled files are not modified or deleted. 56 55 # - Upload the multisite code coverage report to Codecov.io. … … 72 71 73 72 - 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 75 103 76 104 - name: Log debug information … … 83 111 git --version 84 112 svn --version 85 php --version 86 php -i 113 composer --version 87 114 locale -a 88 89 - name: Install NodeJS90 uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # v3.5.191 with:92 node-version-file: '.nvmrc'93 cache: npm94 95 - name: Install Dependencies96 run: npm ci97 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.html100 - name: "Get last Monday's date"101 id: get-date102 run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT103 104 - name: Get Composer cache directory105 id: composer-cache106 run: echo "composer_dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT107 108 - name: Cache Composer dependencies109 uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11110 env:111 cache-name: cache-composer-dependencies112 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 dependencies117 run: |118 docker-compose run --rm php composer --version119 120 # Install using `composer update` as there is no `composer.lock` file.121 docker-compose run --rm php composer update122 115 123 116 - name: Docker debug information … … 129 122 run: | 130 123 npm run env:start 131 132 - name: General debug information133 run: |134 npm --version135 node --version136 curl --version137 git --version138 svn --version139 124 140 125 - name: Log running Docker containers … … 210 195 steps: 211 196 - name: Dispatch workflow run 212 uses: actions/github-script@ 100527700e8b29ca817ac0e0dfbfc5e8ff38edda # v6.3.2197 uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0 213 198 with: 214 199 retries: 2
Note: See TracChangeset
for help on using the changeset viewer.