Skip to content

Commit

Permalink
Merge pull request #28 from localheinz/feature/static-analysis
Browse files Browse the repository at this point in the history
Enhancement: Run phpstan on GitHub Actions
  • Loading branch information
nikolaposa authored Aug 3, 2020
2 parents 2c67077 + 947efa4 commit 464d83f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
36 changes: 32 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,39 @@ on:
- master

jobs:
hello:
name: Hello
static-analysis:
name: Static Analysis

runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- 7.2

steps:
- name: Echo a greeting
run: echo 'Hello, GitHub Actions!'
- name: Checkout
uses: actions/checkout@v2

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

- name: Determine composer cache directory
id: determine-composer-cache-directory
run: echo "::set-output name=directory::$(composer config cache-dir)"

- name: Cache dependencies installed with composer
uses: actions/cache@v2
with:
path: ${{ steps.determine-composer-cache-directory.outputs.directory }}
key: php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: php-${{ matrix.php-version }}-composer-

- name: Install dependencies
run: composer install --no-interaction

- name: Run phpstan/phpstan
run: vendor/bin/phpstan analyse
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ script: ./vendor/bin/phpunit

jobs:
include:
- stage: Static analysis
script: vendor/bin/phpstan analyse

- stage: Coding standards
script: ./vendor/bin/php-cs-fixer fix -v --diff --dry-run

Expand Down

0 comments on commit 464d83f

Please sign in to comment.