Skip to content

replace rest with graphql in the access scope query, add cache (#359) #359

replace rest with graphql in the access scope query, add cache (#359)

replace rest with graphql in the access scope query, add cache (#359) #359

Workflow file for this run

name: Package Test
on: [ push, pull_request ]
jobs:
ci:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
php:
- '8.0'
- '8.1'
- '8.2'
- '8.3'
analysis: [ false ]
coverage: [ 'none' ]
normalize: [ false ]
validate: [ false ]
laravel:
- '8.22'
- '9.0'
- '10.0'
- '11.0.3'
exclude:
- php: '8.0'
laravel: '9.0'
- php: '8.0'
laravel: '10.0'
- php: '8.1'
laravel: '8.22'
- php: '8.1'
laravel: '9.0'
- php: '8.2'
laravel: '8.22'
- php: '8.2'
laravel: '9.0'
- php: '8.3'
laravel: '8.22'
- php: '8.3'
laravel: '9.0'
include:
- php: '8.0'
laravel: '9.39.0'
analysis: true
coverage: 'xdebug'
normalize: true
validate: true
name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }}
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: ${{ matrix.coverage }}
extensions: dom, fileinfo, json, mbstring, pdo_sqlite
- name: Validate composer setup
if: matrix.validate == true
run: composer validate --strict
- name: Install Laravel legacy factories support
if: matrix.laravel != '7.0'
run: composer require "laravel/legacy-factories:^1.1" --dev --no-interaction --no-update
#- name: Install Laravel and Orchestra Testbench
# run: composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-update
- name: Allow composer-normalize plugin
run: composer config allow-plugins.ergebnis/composer-normalize true
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"
restore-keys: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Normalize composer file
if: matrix.normalize == true && matrix.php != '8.0'
run: composer normalize --dry-run
- name: Run test suite
run: vendor/bin/phpunit -v
- name: Run static code analysis
if: matrix.analysis == true
run: vendor/bin/phpstan --memory-limit=-1
- name: Upload coverage results
uses: codecov/codecov-action@v1
if: matrix.coverage != 'none'