Bump tests/specifications from ce9b56b
to 787bbe6
(#1553)
#2172
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Static Analysis" | |
on: | |
merge_group: | |
pull_request: | |
branches: | |
- "v*.*" | |
- "feature/*" | |
push: | |
branches: | |
- "v*.*" | |
- "feature/*" | |
workflow_call: | |
inputs: | |
ref: | |
description: "The git ref to check" | |
type: string | |
required: true | |
env: | |
PHP_VERSION: "8.2" | |
DRIVER_VERSION: "stable" | |
jobs: | |
psalm: | |
name: "Psalm" | |
runs-on: "ubuntu-22.04" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
with: | |
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }} | |
- name: "Get SHA hash of checked out ref" | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
run: | | |
echo CHECKED_OUT_SHA=$(git rev-parse HEAD) >> $GITHUB_ENV | |
- name: "Setup" | |
uses: "./.github/actions/setup" | |
with: | |
php-version: ${{ env.PHP_VERSION }} | |
driver-version: ${{ env.DRIVER_VERSION }} | |
- name: "Run Psalm" | |
run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc) --report=psalm.sarif" | |
- name: "Upload SARIF report" | |
if: ${{ github.event_name != 'workflow_dispatch' }} | |
uses: "github/codeql-action/upload-sarif@v3" | |
with: | |
sarif_file: psalm.sarif | |
- name: "Upload SARIF report" | |
if: ${{ github.event_name == 'workflow_dispatch' }} | |
uses: "github/codeql-action/upload-sarif@v3" | |
with: | |
sarif_file: psalm.sarif | |
ref: ${{ inputs.ref }} | |
sha: ${{ env.CHECKED_OUT_SHA }} |