bueltge/marksimple

View on GitHub
.github/workflows/main.yml

Summary

Maintainability
Test Coverage
name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest    
    strategy:
      matrix:
        php-versions:
          - '7.4'
          - '8.0'
          - '8.1'
        
        include:
          - php-version: '8.2'
            experimental: true
            
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
    # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
    - uses: actions/checkout@v4

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

    - name: Check syntax error in sources
      run: find ./src/ ./tests/ -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l

    - name: Clear cache of Composer
      run: composer clear-cache

    - name: Validate Composer.json and composer.lock
      run: composer update

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

    - name: Check code styles
      continue-on-error: true
      run: ./vendor/bin/phpcs

    - name: Run QA Scripts from composer.json
      run: composer qa