nadar/prosemirror-json-parser

View on GitHub
.github/workflows/phpunit.yml

Summary

Maintainability
Test Coverage
name: PHPUnit Tests

on: [push, pull_request]

env:
  CC_TEST_REPORTER_ID: 1d1f74ba47a7d5ca9fd110c771ddac54d67608513924b89df2b7ed8761541244

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php: ['8.1', '8.2', '8.3', '8.4']

    steps:
    - name: Checkout code
      uses: actions/checkout@v3

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php }}
        extensions: mbstring
        tools: composer
      env:
        COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    - name: Install dependencies
      run: composer clearcache && composer install --prefer-dist

    - name: Run tests
      run: ./vendor/bin/phpunit --coverage-clover=clover.xml --configuration actions.phpunit.xml

    - name: Code coverage
      run: |
        curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
        chmod +x ./cc-test-reporter
        ./cc-test-reporter after-build -t clover
      if: matrix.php == '8.1'