Skip to content

Commit

Permalink
Merge pull request #3 from jakubboucek/workflow
Browse files Browse the repository at this point in the history
Add GitHub workflow
  • Loading branch information
jakubboucek authored Jun 11, 2021
2 parents fdc3e55 + 266d242 commit 1acfc47
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/code_analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Code Analysis

on:
pull_request:
push:
branches:
- master

jobs:
code_analysis:
strategy:
fail-fast: false
matrix:
actions:
- name: PHPStan
run: composer phpstan

php:
- name: PHP 7.3
version: 7.3

- name: PHP 7.4
version: 7.4

- name: PHP 8.0
version: 8.0

name: ${{ matrix.actions.name }} on ${{ matrix.php.name }}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2


# see https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php.version }}
coverage: none


# see https://github.com/actions/cache/blob/main/examples.md#php---composer
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: |
${{ steps.composer-cache.outputs.dir }}
**/composer.lock
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Composer
run: composer install --no-progress

- run: ${{ matrix.actions.run }}

0 comments on commit 1acfc47

Please sign in to comment.