brainworxx/kreXX

View on GitHub
.github/workflows/php.yml

Summary

Maintainability
Test Coverage
name: Build

on:
  push:
    branches: [ master, develop, 'feature/**' ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        php: [ '8.3', '8.2', '8.1', '8.0', '7.4' ]

    steps:

    - name: Switch PHP Version
      uses: shivammathur/setup-php@v2
      with:
        php-version: ${{ matrix.php }}
        coverage: xdebug

    - uses: actions/checkout@v4

    - name: Validate composer.json
      run: composer validate --strict

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

    - name: Build
      run: composer test

    - name: Test & publish code coverage
      uses: paambaati/codeclimate-action@v5.0.0
      if: ${{ matrix.php == '8.3' }}
      env:
        CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATEKEY }}