Skip to content

CI Pipeline

CI Pipeline #28

name: CI Pipeline
on:
workflow_dispatch:
push:
branches:
- "[0-9]+.[0-9]+.x"
pull_request:
jobs:
coding-standard:
name: "Coding Standard"
runs-on: "${{ matrix.operating-system }}"
strategy:
fail-fast: true
matrix:
operating-system: ['ubuntu-latest']
php-version: ['7.4']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: "composer:v2"
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Check codestyle
run: vendor/bin/phpcs -s
static-analysis:
name: "Static Analysis"
runs-on: "${{ matrix.operating-system }}"
strategy:
fail-fast: true
matrix:
php-version: ['7.4']
operating-system: ['ubuntu-latest']
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: "composer:v2"
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Analyze code with static-analysis
run: vendor/bin/phpstan analyse --no-progress
unit-tests:
name: "Unit Tests"
runs-on: "${{ matrix.operating-system }}"
continue-on-error: "${{ matrix.experimental }}"
strategy:
fail-fast: false
matrix:
php-version: ["7.3", "7.4", "8.0", "8.1"]
operating-system: ["ubuntu-latest"]
experimental: [false]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: "composer:v2"
- name: Install dependencies for PHP 7
if: matrix.php-version < '8.0'
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Install dependencies for PHP 8
if: matrix.php-version >= '8.0'
run: composer install --no-progress --prefer-dist --optimize-autoloader --ignore-platform-req=php
- name: Execute tests
run: vendor/bin/phpunit --colors=always --coverage-text