Skip to content

Commit

Permalink
Github Action : PHPUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
Progi1984 committed Sep 21, 2023
1 parent 424efcd commit 537fe6d
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: PHPOffice/Math
on:
push:
branches:
- master
pull_request:

jobs:
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: xml
coverage: ${{ (matrix.php == '7.1') && 'xdebug' || 'none' }}

- uses: actions/checkout@v2

- name: Install dependencies
run: composer install --ansi --prefer-dist --no-interaction --no-progress

- name: Run PHPUnit
run: ./vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/clover.xml

- name: Upload coverage results to Coveralls
if: matrix.php == '7.1'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar
chmod +x php-coveralls.phar
php php-coveralls.phar --coverage_clover=build/clover.xml --json_path=build/coveralls-upload.json -vvv

0 comments on commit 537fe6d

Please sign in to comment.