123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- name: linter
- on:
- pull_request:
- push:
- branches: [ main ]
- permissions:
- contents: read
- jobs:
- linter:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- php-versions: [ '7.2' ]
- steps:
- - uses: actions/checkout@v3
- name: Checkout
- - uses: eWaterCycle/setup-grpc@v5
- name: Setup gRPC
- with:
- grpc-version: 1.51.1
- - uses: shivammathur/setup-php@v2
- name: Setup PHP
- id: php
- with:
- extensions: grpc
- php-version: ${{ matrix.php-versions }}
- - run: composer validate --strict
- name: Validate composer.json and composer.lock
- - uses: actions/cache@v3
- name: Cache Composer packages
- id: composer-cache
- 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 tests
- run: ./vendor/bin/phplint \
- ./ --exclude=vendor
|