Skip to content

CI Pipeline

CI Pipeline #29

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: ['8.1']
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: ['8.1']
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: ["8.1","8.2"]
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
run: composer install --no-progress --prefer-dist --optimize-autoloader --ignore-platform-req=php
- name: Execute tests
run: vendor/bin/phpunit --colors=always --coverage-text