graphql-module-skeleton/.github/workflows/CI.yml
2021-04-21 15:20:57 +02:00

52 lignes
1.6 KiB
YAML

name: CI
on: [push, pull_request]
jobs:
build:
runs-on: Ubuntu-20.04
strategy:
matrix:
php: ['7.1', '7.2', '7.3', '7.4']
DEPENDENCIES: ['', '--prefer-lowest']
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Create project
run: composer create-project oxid-esales/graphql-module --repository packages.json --remove-vcs -n --no-plugins
- name: Syntax Test
run: composer test:syntax
working-directory: ./graphql-module
- name: Lint Test
run: composer test:lint
working-directory: ./graphql-module
- name: Static Analyzer
run: composer test:static
working-directory: ./graphql-module
- name: Unit Tests
run: composer test:unit
working-directory: ./graphql-module