RiktaD/value-path

View on GitHub
.github/workflows/ci.yml

Summary

Maintainability
Test Coverage
name: Testing Query
on: [push, pull_request]

jobs:
  tests:
    strategy:
      matrix:
        php-versions: ['7.4', '8.0']
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php-versions }}
          extensions: mbstring, intl
          coverage: xdebug
      - name: Get Composer Cache Directory
        id: composer-cache
        run: |
          echo "::set-output name=dir::$(composer config cache-files-dir)"
      - uses: actions/cache@v2
        with:
          path: ${{ steps.composer-cache.outputs.dir }}
          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
          restore-keys: |
            ${{ runner.os }}-composer-
      - name: Install dependencies
        run: |
          composer install --no-progress --prefer-dist --optimize-autoloader
      - name: Test with phpunit
        run: vendor/bin/phpunit --coverage-text

  coding-standard:
    name: Coding Standard
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '7.4'
          extensions: mbstring, intl
      - name: Get Composer Cache Directory
        id: composer-cache
        run: |
          echo "::set-output name=dir::$(composer config cache-files-dir)"
      - uses: actions/cache@v2
        with:
          path: ${{ steps.composer-cache.outputs.dir }}
          key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
          restore-keys: |
            ${{ runner.os }}-composer-
      - name: Install dependencies
        run: composer install --no-progress --prefer-dist --optimize-autoloader
      - name: PHP CS FIXER
        run: vendor/bin/php-cs-fixer fix --diff -v --dry-run