File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,42 @@ jobs:
123
123
- name : " Tests"
124
124
run : " vendor/bin/phing tests"
125
125
126
+ tests-code-coverage :
127
+ name : " Tests with code coverage"
128
+
129
+ runs-on : " ubuntu-latest"
130
+
131
+ steps :
132
+ - name : " Checkout"
133
+
134
+
135
+ - name : " Install PHP"
136
+ uses :
" shivammathur/[email protected] "
137
+ with :
138
+ coverage : " pcov"
139
+ php-version : " 7.4"
140
+
141
+ - name : " Cache dependencies"
142
+
143
+ with :
144
+ path : " ~/.composer/cache"
145
+ key : " php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
146
+ restore-keys : " php-${{ matrix.php-version }}-composer-"
147
+
148
+ - name : " Install dependencies"
149
+ run : " composer update --no-interaction --no-progress --no-suggest"
150
+
151
+ - name : " Tests"
152
+ run : |
153
+ composer require pcov/clobber --dev && \
154
+ vendor/bin/pcov clobber && \
155
+ php -dpcov.enabled=1 -dpcov.directory=. -dpcov.exclude="~vendor~" vendor/bin/phpunit -c tests/phpunit.xml tests
156
+
157
+ - name : " Codecov.io"
158
+ env :
159
+ CODECOV_TOKEN : " ${{ secrets.CODECOV_TOKEN }}"
160
+ run : " bash <(curl -s https://codecov.io/bash) -f tests/tmp/clover.xml"
161
+
126
162
tests-windows :
127
163
name : " Tests on Windows"
128
164
You can’t perform that action at this time.
0 commit comments