Skip to content

Commit

Permalink
Add PHP Lint task
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Oct 3, 2022
1 parent 938f483 commit bf8f16e
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/test-application.yaml
Expand Up @@ -22,23 +22,20 @@ jobs:
matrix:
include:
- php-version: '7.2'
lint: false
coverage: false
dependency-versions: 'lowest'
tools: 'composer:v1'
env:
SYMFONY_DEPRECATIONS_HELPER: disabled

- php-version: '7.4'
lint: true
coverage: true
dependency-versions: 'highest'
tools: 'composer:v2'
env:
SYMFONY_DEPRECATIONS_HELPER: weak

- php-version: '8.0'
lint: false
coverage: false
dependency-versions: 'highest'
tools: 'composer:v2'
Expand Down Expand Up @@ -73,18 +70,14 @@ jobs:
tools: ${{ matrix.tools }}

- name: Install composer dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependency-versions }}
composer-options: ${{ matrix.composer-options }}

- name: Bootstrap test environment
run: composer bootstrap-test-environment

- name: Lint Code
if: ${{ matrix.lint }}
run: composer lint

- name: Execute test cases
if: matrix.coverage == false
run: composer test
Expand All @@ -104,3 +97,32 @@ jobs:
- name: Check code coverage
if: ${{ matrix.coverage }}
run: composer check-coverage

lint:
name: 'PHP Lint'
runs-on: ubuntu-latest

env:
DATABASE_URL: mysql://root:root@127.0.0.1:3306/su_headless_test?serverVersion=5.7
DATABASE_CHARSET: utf8mb4
DATABASE_COLLATE: utf8mb4_unicode_ci

steps:
- name: Checkout project
uses: actions/checkout@v2

- name: Install and configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: ctype, iconv, mysql
tools: 'composer:v2'

- name: Install composer dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: 'highest'

- name: Lint Code
if: ${{ matrix.lint }}
run: composer lint

0 comments on commit bf8f16e

Please sign in to comment.