File tree Expand file tree Collapse file tree 3 files changed +81
-2
lines changed Expand file tree Collapse file tree 3 files changed +81
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Coverage
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+
7+ jobs :
8+ run :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v2
14+
15+ - name : Setup PHP
16+ uses : shivammathur/setup-php@v2
17+ with :
18+ php-version : ' 7.2'
19+ coverage : xdebug
20+
21+ - name : Install dependencies
22+ run : composer update --prefer-dist --no-progress
23+
24+ - name : Run PHPUnit test suite
25+ run : ./vendor/bin/phpunit
26+
27+ - name : Update code coverage badge
28+ uses : timkrase/phpunit-coverage-badge@v1.2.0
29+ with :
30+ report : ./clover.xml
31+ report_type : clover
32+ coverage_badge_path : ./.github/coverage.svg
33+ push_badge : true
34+ repo_token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ name : Testing
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ run :
11+ runs-on : ${{ matrix.operating-system }}
12+ strategy :
13+ matrix :
14+ operating-system : [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
15+ php-version : [ '7.2', '7.3', '7.4', '8.0' ]
16+ include :
17+ - operating-system : ubuntu-latest
18+ php-version : ' 7.2'
19+ fail-fast : false
20+
21+ steps :
22+ - uses : actions/checkout@v2
23+
24+ - name : Setup PHP
25+ uses : shivammathur/setup-php@v2
26+ with :
27+ php-version : ${{ matrix.php-version }}
28+ coverage : xdebug
29+
30+ - name : Validate composer.json and composer.lock
31+ run : composer validate
32+
33+ - name : Install dependencies
34+ run : composer update --prefer-dist --no-progress
35+
36+ - name : Run Psalm static code analysis
37+ run : ./vendor/bin/psalm
38+
39+ - name : Run PHPUnit test suite
40+ run : ./vendor/bin/phpunit
41+
42+ - name : Check code coverage
43+ run : ./vendor/bin/coverage clover.xml 100
44+ if : matrix.php-version != '8.0'
Original file line number Diff line number Diff line change 3636 "require-dev" : {
3737 "phpunit/phpunit" : " ^8" ,
3838 "mockery/mockery" : " ^1.3" ,
39- "symfony/yaml" : " ^5.2" ,
40- "vimeo/psalm" : " ^4.4"
39+ "symfony/yaml" : " ^4.4" ,
40+ "vimeo/psalm" : " ^4.4" ,
41+ "incompass/coverage" : " ^1.0"
4142 }
4243}
You can’t perform that action at this time.
0 commit comments