Changeset 51545 for trunk/.github/workflows/test-coverage.yml
- Timestamp:
- 08/04/2021 07:48:56 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/test-coverage.yml
r51535 r51545 19 19 env: 20 20 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} 21 COMPOSER_INSTALL: ${{ false }}22 # Controls which NPM script to use for running PHPUnit tests. Options ar `php` and `php-composer`.23 PHPUNIT_SCRIPT: php24 21 LOCAL_PHP: '7.4-fpm' 25 22 LOCAL_PHP_XDEBUG: true … … 89 86 run: npm ci 90 87 88 # This date is used to ensure that the Composer cache is refreshed at least once every week. 89 # http://man7.org/linux/man-pages/man1/date.1.html 90 - name: "Get last Monday's date" 91 id: get-date 92 run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")" 93 shell: bash 94 95 - name: Get Composer cache directory 96 id: composer-cache 97 run: echo "::set-output name=dir::$(composer config cache-files-dir)" 98 99 - name: Cache Composer dependencies 100 uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 101 env: 102 cache-name: cache-composer-dependencies 103 with: 104 path: ${{ steps.composer-cache.outputs.dir }} 105 key: ${{ runner.os }}-php-${{ matrix.php }}-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }} 106 107 - name: Install Composer dependencies 108 run: | 109 docker-compose run --rm php composer --version 110 111 # Install using `composer update` as there is no `composer.lock` file. 112 docker-compose run --rm php composer update 113 91 114 - name: Docker debug information 92 115 run: | … … 122 145 - name: Run tests as a single site 123 146 if: ${{ ! matrix.multisite }} 124 run: npm run test: ${{ env.PHPUNIT_SCRIPT }}-- --verbose -c phpunit.xml.dist --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml147 run: npm run test:php-composer -- --verbose -c phpunit.xml.dist --coverage-clover wp-code-coverage-single-clover-${{ github.sha }}.xml 125 148 126 149 - name: Ensure version-controlled files are not modified during the tests … … 136 159 - name: Run tests as a multisite install 137 160 if: ${{ matrix.multisite }} 138 run: npm run test: ${{ env.PHPUNIT_SCRIPT }}-- --verbose -c tests/phpunit/multisite.xml --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml161 run: npm run test:php-composer -- --verbose -c tests/phpunit/multisite.xml --coverage-clover wp-code-coverage-multisite-clover-${{ github.sha }}.xml 139 162 140 163 - name: Ensure version-controlled files are not modified during the tests
Note: See TracChangeset
for help on using the changeset viewer.