rtckit/php-sip

View on GitHub
.github/workflows/ci.yaml

Summary

Maintainability
Test Coverage
name: CI

on:
  push:
  pull_request:

jobs:
  StaticAnalysis:
    name: StaticAnalysis (PHP ${{ matrix.php }} on ${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - ubuntu-20.04
        php:
          - 7.4
          - 8.0
          - 8.1
          - 8.2
    steps:
      - uses: actions/checkout@v2
      - uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
      - run: composer install
      - run: composer phpstan
      - run: composer psalm -- --output-format=github --shepherd

  Coverage:
    name: Coverage (PHP ${{ matrix.php }} on ${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - ubuntu-20.04
        php:
          - 7.4
          - 8.0
          - 8.1
          - 8.2
    steps:
      - uses: actions/checkout@v2
      - uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
      - run: composer install
      - uses: paambaati/codeclimate-action@v4.0.0
        env:
          CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
        with:
          coverageCommand: php -d memory_limit=-1 ./vendor/bin/phpunit -c ./etc/phpunit.xml.dist --coverage-clover clover.xml
          coverageLocations: clover.xml:clover
          debug: true