Skip to content

Add github action for checks #1

Add github action for checks

Add github action for checks #1

Workflow file for this run

name: PHP Checks
on:
push:
branches: ["trunk", "develop"]
pull_request:
branches: ["trunk", "develop"]
permissions:
contents: read
env:
PHP_VERSION: ${{ env.PHP_EXTENSIONS }}

Check failure on line 13 in .github/workflows/php.yml

View workflow run for this annotation

GitHub Actions / PHP Checks

Invalid workflow file

The workflow is not valid. .github/workflows/php.yml (Line: 13, Col: 16): Unrecognized named-value: 'env'. Located at position 1 within expression: env.PHP_EXTENSIONS
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_EXTENSIONS }}
tools: composer:v2
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run PHPCS
run: composer run lint
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_EXTENSIONS }}
tools: composer:v2
- name: Install dependencies
run: composer install --no-progress --no-suggest
- name: Run PHPStan
run: composer run static
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PHP with composer v2
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_EXTENSIONS }}
tools: composer:v2
- name: Install dependencies
run: composer install --no-progress --no-suggest
- name: Run PHPUnit
run: composer run test