hotrush/laravel-signer

View on GitHub
.github/workflows/main.yml

Summary

Maintainability
Test Coverage
name: Tests and coverage

on: [push, pull_request]

jobs:
  tests:
    name: Tests
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php-versions: ['8.1', '8.2']
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: mbstring
          coverage: xdebug

      - name: Install Composer dependencies
        run: composer install --no-progress --prefer-dist --optimize-autoloader

      - name: PHPStan
        run: composer analyse

      - name: Test with phpunit
        run: composer test-coverage

      - name: Upload coverage
        uses: paambaati/codeclimate-action@v3.0.0
        env:
          CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
        with:
          coverageLocations: ${{github.workspace}}/clover.xml:clover