Unverified Commit db5afa26 authored by Grégoire Paris's avatar Grégoire Paris Committed by GitHub

Merge pull request #3979 from bendavies/phpcs-github-actions

Move phpcs from Travis to GitHub Actions
parents 4c03ed81 b46e86e4
...@@ -6,28 +6,66 @@ on: ...@@ -6,28 +6,66 @@ on:
jobs: jobs:
static-analysis-psalm: static-analysis-psalm:
name: Static Analysis with Psalm name: "Static Analysis with Psalm"
runs-on: ubuntu-latest runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
steps: steps:
- name: Checkout code - name: "Checkout code"
uses: actions/checkout@v2 uses: "actions/checkout@v2"
- name: "Install PHP" - name: "Install PHP"
uses: "shivammathur/setup-php@1.8.1" uses: "shivammathur/setup-php@v2"
with: with:
coverage: "none" coverage: "none"
php-version: "7.4" php-version: "${{ matrix.php-version }}"
- name: "Cache dependencies installed with composer" - name: "Cache dependencies installed with composer"
uses: "actions/cache@v1.0.3" uses: "actions/cache@v1"
with: with:
path: "~/.composer/cache" path: "~/.composer/cache"
key: "composer-${{ hashFiles('composer.lock') }}" key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "composer-" restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
- name: "Install dependencies with composer" - name: "Install dependencies with composer"
run: "composer install --no-interaction --no-progress --no-suggest" run: "composer install --no-interaction --no-progress --no-suggest"
- name: Psalm - name: "Psalm"
run: "vendor/bin/psalm" run: "vendor/bin/psalm"
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.4"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: "cs2pr"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v1"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
- name: "Install dependencies with composer"
run: "composer install --no-interaction --no-progress --no-suggest"
- name: "Run squizlabs/php_codesniffer"
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
...@@ -49,11 +49,6 @@ jobs: ...@@ -49,11 +49,6 @@ jobs:
env: PHPStan env: PHPStan
install: travis_retry composer install --prefer-dist install: travis_retry composer install --prefer-dist
script: vendor/bin/phpstan analyse script: vendor/bin/phpstan analyse
- stage: Smoke Testing
php: 7.3
env: PHP_CodeSniffer
install: travis_retry composer install --prefer-dist
script: vendor/bin/phpcs
- stage: Test - stage: Test
php: 7.2 php: 7.2
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment