Skip to content

Commit

Permalink
Lint on all PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Mar 17, 2020
1 parent 1dca53a commit 1d0d3ad
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Expand Up @@ -12,6 +12,45 @@ env:
COMPOSER_ROOT_VERSION: "0.12.x-dev"

jobs:
lint:
name: "Lint"

runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.1"
- "7.2"
- "7.3"
- "7.4"

steps:
- name: "Checkout"
uses: "actions/checkout@v2.0.0"

- name: "Install PHP"
uses: "shivammathur/setup-php@1.8.2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"

- name: "Validate Composer"
run: "composer validate"

- name: "Cache dependencies"
uses: "actions/cache@v1.1.2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-"

- name: "Install dependencies"
run: "composer update --no-interaction --no-progress --no-suggest"

- name: "Lint"
run: "vendor/bin/phing lint"

coding-standards:
name: "Coding Standard"

Expand Down
@@ -1,4 +1,4 @@
<?php
<?php // lint >= 7.4

namespace IssetNativePropertyTypes;

Expand Down
@@ -1,4 +1,4 @@
<?php
<?php // lint >= 7.4

function (): void {
$scalar = 3;
Expand Down

0 comments on commit 1d0d3ad

Please sign in to comment.