Allow fully qualified global constants #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
jobs: | |
lint: | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ubuntu-latest] | |
php-versions: ["7.2"] | |
runs-on: ${{ matrix.operating-system }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: none | |
- name: Get Composer Cache Directory | |
id: composer-cache-dir | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-${{ matrix.php-versions }}-composer- | |
- name: Install dependencies | |
run: composer install --no-progress | |
- name: Check coding style | |
run: vendor/bin/phpcs | |
- name: Show PHPStan version | |
run: vendor/bin/phpstan --version | |
- name: Run static analyser | |
run: vendor/bin/phpstan analyse | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ubuntu-latest] | |
php-versions: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"] | |
mode: [low, high] | |
runs-on: ${{ matrix.operating-system }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
coverage: none | |
- name: Get Composer Cache Directory | |
id: composer-cache-dir | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-${{ matrix.php-versions }}-${{ matrix.mode }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-${{ matrix.php-versions }}-${{ matrix.mode }}-composer- | |
- name: Install dependencies | |
run: | | |
[[ "${{ matrix.mode }}" = "low" ]] && composer update --no-progress --prefer-lowest || true | |
[[ "${{ matrix.mode }}" = "high" ]] && composer update --no-progress || true | |
- name: Show phpunit version | |
run: vendor/bin/phpunit --version | |
- name: Run testing | |
run: vendor/bin/phpunit |