Add Psalm to GitHub Actions

This commit is contained in:
Oliver Davies 2020-06-05 22:09:51 +01:00
parent 259946d961
commit 0ed99797f5
3 changed files with 37 additions and 1 deletions

31
.github/workflows/static-analysis.yml vendored Normal file
View file

@ -0,0 +1,31 @@
---
name: Static analysis
on:
pull_request:
push:
paths:
- '**.php'
- '*psalm.xml'
jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: 7.4
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v1
with:
path: vendor
key: composer-${{ hashFiles('composer.lock' )}}
- name: Run Psalm
run: make static-code-analysis