File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ test :
11+ strategy :
12+ matrix :
13+ php-versions : [ '7.4', '8.0', '8.1' ]
14+ include :
15+ - php-versions : ' 7.4'
16+ coverage : pcov
17+ composer-prefer : ' --prefer-lowest --prefer-stable'
18+ phpunit-flags : ' --coverage-clover coverage.xml'
19+
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+ - uses : actions/checkout@v2
24+
25+ - name : Set up PHP
26+ uses : shivammathur/setup-php@v2
27+ with :
28+ php-version : ${{ matrix.php-versions }}
29+ coverage : ${{ matrix.coverage }}
30+
31+ - name : Validate composer.json and composer.lock
32+ run : composer validate --strict
33+
34+ - name : Cache Composer packages
35+ id : composer-cache
36+ uses : actions/cache@v2
37+ with :
38+ path : vendor
39+ key : ${{ runner.os }}-composer-${{ matrix.composer-prefer }}$-${{ hashFiles('**/composer.lock') }}
40+ restore-keys : |
41+ ${{ runner.os }}-composer-${{ matrix.composer-prefer }}-
42+
43+ - name : Install dependencies
44+ run : composer update --prefer-dist --no-progress ${{ matrix.composer-prefer }}
45+
46+ - name : Run test suite
47+ run : vendor/bin/phpunit ${{ matrix.phpunit-flags }}
48+
49+ - name : Upload coverage
50+ if : matrix.coverage
51+ run : |
52+ wget https://scrutinizer-ci.com/ocular.phar
53+ php ocular.phar code-coverage:upload --format=php-clover coverage.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments