Skip to content

Commit

Permalink
Fix static analysys tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Nov 24, 2020
1 parent 2aa1dd4 commit fe78c6d
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/static.yml
@@ -1,15 +1,12 @@
name: static analysis

on:
- pull_request
- push

name: static analysis

jobs:
mutation:
name: PHP ${{ matrix.php-version }}-${{ matrix.os }}
env:
COMPOSER_ROOT_VERSION: "dev-master"
extensions: gd
name: PHP ${{ matrix.php }}-${{ matrix.os }}

runs-on: ${{ matrix.os }}

Expand All @@ -18,34 +15,36 @@ jobs:
os:
- ubuntu-latest

php-version:
php:
- "7.4"

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

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
extensions: ${{ env.extensions }}
php-version: "${{ matrix.php }}"
tools: composer:v2, cs2pr
coverage: none

- name: Determine composer cache directory
run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)"
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php-version }}-composer-
php${{ matrix.php }}-composer-
- name: Update composer
run: composer self-update

- name: Install dependencies with composer
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Static analysis with phan
- name: Static analysis
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize

0 comments on commit fe78c6d

Please sign in to comment.