Mezzle/queuejitsu-cli

View on GitHub
.github/workflows/grumphp.yml

Summary

Maintainability
Test Coverage
name: GrumPHP
on: push

jobs:
  grumphp:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php_version:
        - '7.2'
        - '7.3'
        - '7.4'
    steps:
      - uses: actions/checkout@v2
      - name: Cache Composer Cache
        uses: actions/cache@v2
        with:
          # npm cache files are stored in `~/.npm` on Linux/macOS
          path: ~/.composer/cache
          key: ${{ runner.os }}-build-composer-cache-${{ matrix.php_version }}-${{ hashFiles('**/composer.json') }}
          restore-keys: |
            ${{ runner.os }}-build-composer-cache-${{ matrix.php_version }}-
            ${{ runner.os }}-build-composer-cache-
            ${{ runner.os }}-
      - name: Install PHP
        run: |
          sudo add-apt-repository ppa:ondrej/php -y
          sudo apt-get update
          sudo apt-get install php${{ matrix.php_version }}
      - name: Install Extensions
        run: sudo apt-get install php${{ matrix.php_version }}-json
      - name: Install Composer
        run: |
          php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
          php -r "if (hash_file('sha384', 'composer-setup.php') === 'e5325b19b381bfd88ce90a5ddb7823406b2a38cff6bb704b0acc289a09c8128d4a8ce2bbafcd1fcbdc38666422fe2806') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
          php composer-setup.php
          php -r "unlink('composer-setup.php');"
      - name: Composer install
        run: php composer.phar install
      - name: GrumPHP
        run: |
          vendor/bin/grumphp run