Skip to content

Load all library files automatically in tests #644

Load all library files automatically in tests

Load all library files automatically in tests #644

Workflow file for this run

name: PHP Tests
on: [push, pull_request]
jobs:
lint-phpcs-phpstan:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
run:
- composer lint
- composer phpcs
- composer phpstan
exclude:
- php-version: "7.2"
run: composer lint
- php-version: "7.3"
run: composer lint
- php-version: "7.4"
run: composer lint
- php-version: "8.0"
run: composer lint
include:
- php-version: "7.2"
run: composer lint-7.x
- php-version: "7.3"
run: composer lint-7.x
- php-version: "7.4"
run: composer lint-7.x
- php-version: "8.0"
run: composer lint-8.0
steps:
- uses: actions/checkout@v3
- name: OS info
run: cat /etc/os-release
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: PHP info
run: |
php -v
php -m
- name: Validate composer.json
run: composer validate --strict --no-interaction
- name: Install dependencies
run: composer update --no-progress --no-interaction
- name: Run tests
run: ${{ matrix.run }}
lint-neon:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "8.2"
steps:
- uses: actions/checkout@v3
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
- name: PHP info
run: |
php -v
php -m
- name: Install dependencies
run: composer update --no-progress --no-interaction
- name: Run tests
run: composer lint-neon
phpunit:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
operating-system:
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
coverage: "pcov"
php-version: "${{ matrix.php-version }}"
- name: PHP info
run: |
php -v
php -m
- name: Install dependencies
run: composer update --no-progress --no-interaction
- name: Run tests
run: composer phpunit