Skip to content

Reduce amount of evergreen config includes #1572

Reduce amount of evergreen config includes

Reduce amount of evergreen config includes #1572

Workflow file for this run

name: "Static Analysis"
on:
merge_group:
pull_request:
branches:
- "v*.*"
- "master"
- "feature/*"
push:
branches:
- "v*.*"
- "master"
- "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 }}