Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelfolaron committed Apr 13, 2022
1 parent 3c351bf commit b057064
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
name: Psalm Static analysis
name: Psalm

on: [push, pull_request]
on:
push:
paths:
- '**.php'
- 'psalm.xml.dist'

jobs:
psalm:
name: Psalm
name: psalm
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Psalm
uses: docker://vimeo/psalm-github-actions
continue-on-error: true
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
security_analysis: true
report_file: results.sarif
composer_require_dev: true
composer_ignore_platform_reqs: false

- name: Upload Security Analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
php-version: '7.4'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, ext-ldap
coverage: none

- name: Cache composer dependencies
uses: actions/cache@v2
with:
sarif_file: results.sarif

path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Run composer install
run: composer install -n --prefer-dist

- name: Run psalm
run: ./vendor/bin/psalm --output-format=github

0 comments on commit b057064

Please sign in to comment.