File tree Expand file tree Collapse file tree 4 files changed +23
-3
lines changed
Expand file tree Collapse file tree 4 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 2222 with :
2323 php-version : ${{ matrix.php }}
2424 extensions : ${{ matrix.extensions }}
25- ini-values : pcov.directory=moodle
25+ ini-values : pcov.directory=moodle, error_reporting=-1, display_errors=On
2626 coverage : pcov
2727 tools : composer
2828
4646
4747 - name : Test coverage
4848 run : ./vendor/bin/phpunit-coverage-check -t 80 clover.xml
49+
50+ - name : Integration tests
51+ if : ${{ always() }}
52+ run : |
53+ # There is one failure (exit with error)
54+ vendor/bin/phpcs --standard=moodle moodle/Tests/fixtures/integration_test_ci.php | tee output.txt || [[ $? = 1 ]]
55+ grep -q "PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY" output.txt
56+
57+ # The failure is fixed (exit with error)
58+ vendor/bin/phpcbf --standard=moodle moodle/Tests/fixtures/integration_test_ci.php | tee output.txt || [[ $? = 1 ]]
59+ grep -q "A TOTAL OF 1 ERROR WERE FIXED IN 1 FILE" output.txt
60+
61+ # So, there isn't any failure any more (exit without error)
62+ vendor/bin/phpcs --standard=moodle moodle/Tests/fixtures/integration_test_ci.php | tee output.txt && [[ $? = 0 ]]
Original file line number Diff line number Diff line change 1616 ],
1717 "require" : {
1818 "dealerdirect/phpcodesniffer-composer-installer" : " ^0.7.2" ,
19- "squizlabs/php_codesniffer" : " ^3.6 " ,
20- "phpcompatibility/php-compatibility" : " ^9.3 "
19+ "squizlabs/php_codesniffer" : " ^3.7.1 " ,
20+ "phpcompatibility/php-compatibility" : " dev-develop#2fb82334 "
2121 },
2222 "config" : {
2323 "allow-plugins" : {
Original file line number Diff line number Diff line change 1+ <?php
2+ // phpcs:disable moodle.Files
3+ defined ('MOODLE_INTERNAL ' ) || die (); // Make this always the 1st line in all CS fixtures.
4+ $ arr ['wrong ' ] = $ value ;
Original file line number Diff line number Diff line change 4343
4444 <rule ref =" Generic.CodeAnalysis.EmptyStatement" />
4545
46+ <rule ref =" Squiz.Arrays.ArrayBracketSpacing" />
47+
4648 <rule ref =" Squiz.Commenting.DocCommentAlignment" />
4749 <rule ref =" Squiz.Commenting.EmptyCatchComment" />
4850
You can’t perform that action at this time.
0 commit comments