|
| 1 | +name: Tests |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + tests: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + php: ['7.2', '7.3', '7.4'] |
| 11 | + |
| 12 | + fail-fast: false |
| 13 | + |
| 14 | + name: PHP ${{ matrix.php }} tests |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v2 |
| 17 | + - uses: shivammathur/setup-php@v2 |
| 18 | + with: |
| 19 | + php-version: ${{ matrix.php }} |
| 20 | + extensions: json, mbstring, xml, tokenizer |
| 21 | + coverage: none |
| 22 | + |
| 23 | + - run: composer install --no-interaction --prefer-source |
| 24 | + - run: vendor/bin/tester tests -s -C |
| 25 | + - if: failure() |
| 26 | + uses: actions/upload-artifact@v1 |
| 27 | + with: |
| 28 | + name: output |
| 29 | + path: tests/PdfResponse/output |
| 30 | + |
| 31 | + lowest_dependencies: |
| 32 | + name: Lowest Dependencies |
| 33 | + runs-on: ubuntu-latest |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v2 |
| 36 | + - uses: shivammathur/setup-php@v2 |
| 37 | + with: |
| 38 | + php-version: 7.2 |
| 39 | + extensions: json, mbstring, xml, tokenizer |
| 40 | + coverage: none |
| 41 | + |
| 42 | + - run: composer update --no-interaction --prefer-dist --prefer-lowest --prefer-stable |
| 43 | + - run: vendor/bin/tester tests -s -C |
| 44 | + |
| 45 | + |
| 46 | + code_coverage: |
| 47 | + name: Code Coverage |
| 48 | + runs-on: ubuntu-latest |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v2 |
| 51 | + - uses: shivammathur/setup-php@v2 |
| 52 | + with: |
| 53 | + php-version: 7.4 |
| 54 | + extensions: json, mbstring, xml, tokenizer, xdebug |
| 55 | + coverage: none |
| 56 | + |
| 57 | + - run: mkdir -p tests/tmp |
| 58 | + - run: composer install --no-progress --prefer-dist |
| 59 | + - run: wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar |
| 60 | + - run: vendor/bin/tester -p phpdbg tests -s -C --coverage ./coverage.xml --coverage-src ./src |
| 61 | + - run: php coveralls.phar --verbose --config tests/.coveralls.yml |
0 commit comments