Skip to content

Commit

Permalink
Add improvements (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Sep 4, 2020
1 parent 99c844d commit 42e86a1
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 429 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/mutation.yml
Expand Up @@ -65,6 +65,9 @@ jobs:
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader

- name: Run test mutation infection with coverage
run: vendor/bin/infection --no-progress
run: |
mkdir -p build/logs
vendor/bin/phpunit --coverage-xml=build/logs/coverage-xml --log-junit=build/logs/junit.xml
vendor/bin/infection --threads=2 --coverage=build/logs --show-mutations --no-progress
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
18 changes: 7 additions & 11 deletions .github/workflows/static.yml
Expand Up @@ -6,10 +6,7 @@ on:

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

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

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

php:
php-version:
- "7.4"

steps:
Expand All @@ -28,24 +25,23 @@ jobs:
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
extensions: ${{ env.extensions }}
php-version: "${{ matrix.php-version }}"
tools: composer:v2, cs2pr
coverage: none

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

- name: Cache dependencies installed with composer
uses: actions/cache@v2.1.1
uses: actions/cache@v1
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
php${{ matrix.php }}-composer-
php${{ matrix.php-version }}-composer-
- name: Install dependencies with composer
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader

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

0 comments on commit 42e86a1

Please sign in to comment.