|
12 | 12 | BROWSERTEST_OUTPUT_DIRECTORY: "sites/simpletest/browser_output"
|
13 | 13 | BROWSERTEST_OUTPUT_BASE_URL: ""
|
14 | 14 | MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", { "chromeOptions": { "w3c": false } }, "http://127.0.0.1:9515/wd/hub"]'
|
15 |
| - |
| 15 | + |
16 | 16 | on:
|
17 | 17 | push:
|
18 | 18 | pull_request_target:
|
|
48 | 48 | - name: "Install PHP"
|
49 | 49 | uses: "shivammathur/setup-php@v2"
|
50 | 50 | with:
|
51 |
| - coverage: "none" |
| 51 | + coverage: "xdebug" |
52 | 52 | php-version: "${{ matrix.php-version }}"
|
53 | 53 | tools: composer:v2
|
54 | 54 | extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, gd, exif, iconv, opcache, imagick
|
@@ -104,36 +104,38 @@ jobs:
|
104 | 104 | name: composer-${{ matrix.php-version }}-${{ matrix.drupal-core }}-artifact
|
105 | 105 | path: drupal/composer.*
|
106 | 106 |
|
107 |
| - - name: "PHPUnit unit" |
108 |
| - run: | |
109 |
| - cd drupal |
110 |
| - vendor/bin/phpunit -c core --verbose --color --group apigee_api_catalog --testsuite unit |
111 |
| -
|
112 |
| - - name: "PHPUnit kernel" |
113 |
| - run: | |
114 |
| - cd drupal |
115 |
| - vendor/bin/phpunit -c core --verbose --color --group apigee_api_catalog --testsuite kernel |
116 |
| -
|
117 | 107 | - uses: nanasess/setup-chromedriver@v1
|
118 | 108 |
|
119 | 109 | - run: |
|
120 | 110 | export DISPLAY=:99
|
121 | 111 | chromedriver --url-base=/wd/hub &
|
122 | 112 | sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
|
123 | 113 |
|
124 |
| - - name: "PHPUnit functional javascript" |
| 114 | + - name: "Run PHPUnit Tests" |
| 115 | + if: ${{ matrix.drupal-core != '9.4.x' || matrix.php-version != '8.1' }} |
125 | 116 | run: |
|
126 | 117 | cd drupal
|
127 |
| - vendor/bin/phpunit -c core --verbose --color --group apigee_api_catalog --testsuite functional-javascript |
| 118 | + vendor/bin/phpunit -c core --verbose --color --group apigee_api_catalog --testsuite unit,kernel,functional,functional-javascript modules/contrib/apigee_api_catalog |
128 | 119 |
|
129 |
| - - name: "PHPUnit functional" |
| 120 | + - name: "Run PHPUnit Tests with Code Coverage" |
| 121 | + if: ${{ matrix.drupal-core == '9.4.x' && matrix.php-version == '8.1' }} |
130 | 122 | run: |
|
131 | 123 | cd drupal
|
132 |
| - vendor/bin/phpunit -c core --verbose --color --group apigee_api_catalog --testsuite functional |
| 124 | + cp modules/contrib/apigee_api_catalog/phpunit.core.xml.dist core/phpunit.xml |
| 125 | + vendor/bin/phpunit -c core --verbose --color --group apigee_api_catalog --testsuite unit,kernel,functional,functional-javascript --coverage-clover /tmp/coverage.xml modules/contrib/apigee_api_catalog |
133 | 126 |
|
134 | 127 | - name: Artifacts
|
135 | 128 | if: failure()
|
136 | 129 | uses: actions/upload-artifact@v3
|
137 | 130 | with:
|
138 | 131 | name: browser-output-${{ matrix.php-version }}-${{ matrix.drupal-core }}-artifact
|
139 | 132 | path: drupal/sites/simpletest/browser_output/*
|
| 133 | + |
| 134 | + - name: Upload Coverage to Codecov |
| 135 | + if: ${{ matrix.drupal-core == '9.4.x' && matrix.php-version == '8.1' }} |
| 136 | + uses: codecov/codecov-action@v3 |
| 137 | + with: |
| 138 | + files: /tmp/coverage.xml |
| 139 | + name: codecov-umbrella |
| 140 | + fail_ci_if_error: true |
| 141 | + verbose: true |
0 commit comments