Skip to content

Fix fatal error if config/env does not exists #84

Fix fatal error if config/env does not exists

Fix fatal error if config/env does not exists #84

Workflow file for this run

name: PHP Unit Tests
on:
push:
paths:
- '**workflows/unit-tests-php.yml'
- '**.php'
- '**phpunit.xml.dist'
- '**psalm.xml'
pull_request:
paths:
- '**workflows/quality-assurance-php.yml'
- '**.php'
- '**phpcs.xml.dist'
- '**psalm.xml'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests-php:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-ver: [ '8.0', '8.1', '8.2', '8.3' ]
composer: [ '2.4', '2.5', '2.6', '2' ]
dependency-versions: [ 'lowest', 'highest' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-ver }}
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
coverage: none
tools: "composer:${{ matrix.composer }}"
- name: Adjust dependencies in 'composer.json'
run: |
composer remove composer-plugin-api --no-update
composer remove composer/composer inpsyde/php-coding-standards vimeo/psalm --dev --no-update
composer require "composer/composer:~${{ matrix.composer }}.0" --dev --no-update
- name: Install dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependency-versions }}
tools: composer:v${{ matrix.composer-ver }}
- name: Run unit tests
run: ./vendor/bin/phpunit --no-coverage