Your IP : 216.73.217.100


Current Path : /home/rtorresani/www/vendor/colinmollenhour/cache-backend-redis/.github/workflows/
Upload File :
Current File : //home/rtorresani/www/vendor/colinmollenhour/cache-backend-redis/.github/workflows/php.yml

name: PHPUnit

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

permissions:
  contents: read

jobs:
  test:

    runs-on: ubuntu-latest

    services:
      redis:
        image: redis
        options: >-
          --health-cmd "redis-cli ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5
        ports:
          - 6379:6379

    steps:
    - uses: actions/checkout@v3

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

    - name: Cache Composer packages
      id: composer-cache
      uses: actions/cache@v3
      with:
        path: vendor
        key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
        restore-keys: |
          ${{ runner.os }}-php-

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

    - name: Run PHPUnit test suite
      run: composer run-script test

    - name: Run PHP CS Fixer
      run: composer run-script php-cs-fixer -- --dry-run