Skip to content

tests: adding unit testing to App class #121

tests: adding unit testing to App class

tests: adding unit testing to App class #121

Workflow file for this run

name: PHP Quality Assurance
on:
pull_request:
paths:
- '**workflows/qa.yml'
- '**.php'
- '**phpcs.xml.dist'
- '**phpunit.xml.dist'
- '**psalm.xml'
- '**composer.json'
push:
paths:
- '**workflows/qa.yml'
- '**.php'
- '**phpcs.xml.dist'
- '**phpunit.xml.dist'
- '**psalm.xml'
- '**composer.json'
workflow_dispatch:
inputs:
jobs:
required: true
type: choice
default: 'Run all'
description: 'Choose jobs to run'
options:
- 'Run all'
- 'Run PHPCS only'
- 'Run Psalm only'
- 'Run static analysis (PHPCS + Psalm)'
- 'Run unit tests only'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coding-standards-analysis-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs != 'Run unit tests only') && (github.event.inputs.jobs != 'Run Psalm only')) }}
uses: inpsyde/reusable-workflows/.github/workflows/coding-standards-php.yml@main
static-code-analysis-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs != 'Run unit tests only') && (github.event.inputs.jobs != 'Run PHPCS only')) }}
uses: inpsyde/reusable-workflows/.github/workflows/static-analysis-php.yml@main
tests-unit-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run unit tests only')) }}
uses: inpsyde/reusable-workflows/.github/workflows/tests-unit-php.yml@main
strategy:
matrix:
php: [ "7.2", "7.3", "7.4", "8.0", "8.1", "8.2" ]
with:
PHP_VERSION: ${{ matrix.php }}
test-project-php:
if: ${{ (github.event_name != 'workflow_dispatch') || ((github.event.inputs.jobs == 'Run all') || (github.event.inputs.jobs == 'Run unit tests only')) }}
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ["7.4", "8.0", "8.1", "8.2"]
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none
- uses: ramsey/composer-install@v2
with:
composer-options: '-d tests/example'
- run: composer tests:example-project