1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Add linting to prevent embarassing errors (#5209)

* Added linting to prevent embarassing errors

Refs vimeo/psalm#5201

* Ignore unused requirements
This commit is contained in:
Bruce Weirdan 2021-02-13 00:03:03 +02:00 committed by GitHub
parent e476625c1e
commit 7e61012359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 0 deletions

View File

@ -2,6 +2,41 @@ name: Run unit tests
on: [push, pull_request]
jobs:
lint:
name: Check PHP syntax
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.1'
tools: composer:v2
- uses: actions/checkout@v2
- name: Get Composer Cache Directories
id: composer-cache
run: |
echo "::set-output name=files_cache::$(composer config cache-files-dir)"
echo "::set-output name=vcs_cache::$(composer config cache-vcs-dir)"
- name: Cache composer cache
uses: actions/cache@v2
with:
path: |
${{ steps.composer-cache.outputs.files_cache }}
${{ steps.composer-cache.outputs.vcs_cache }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Run composer install
run: composer install -o --ignore-platform-reqs
env:
COMPOSER_ROOT_VERSION: dev-master
- run: |
vendor/bin/parallel-lint src
chunk-matrix:
name: Generate Chunk Matrix

View File

@ -44,6 +44,7 @@
"amphp/amp": "^2.4.2",
"bamarni/composer-bin-plugin": "^1.2",
"brianium/paratest": "^4.0||^6.0",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpdocumentor/reflection-docblock": "^5",
"phpmyadmin/sql-parser": "5.1.0||dev-master",
"phpspec/prophecy": ">=1.9.0",