Skip to content

docs: clarify README #44

docs: clarify README

docs: clarify README #44

Workflow file for this run

name: PHP Psalm
on:
workflow_dispatch:
pull_request:
types: [ready_for_review]
push:
branches:
- main
release:
types: [published]
jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
ref: ${{ github.head_ref }}
# mtime needs to be restored for Psalm cache to work correctly
- name: Restore mtimes
uses: chetan/git-restore-mtime-action@d186aca54f8760da4dec55313195e51ed3ebb0b3 # v2
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: 8.4
coverage: none
- name: Get Composer cache directory
id: composer-cache
run: |
echo "composer_dir={$(composer config cache-files-dir)}" >> $GITHUB_OUTPUT
- name: Retrieve Composer‘s cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ${{ steps.composer-cache.outputs.composer_dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install composer dependencies
run: "composer install --no-interaction --no-progress --no-scripts"
# the way cache keys are set up will always cause a cache miss
# but will restore the cache generated during the previous run based on partial match
- name: Retrieve Psalm’s cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ./cache/psalm
key: ${{ runner.os }}-psalm-cache-${{ hashFiles('psalm.xml', 'psalm-baseline.xml') }}
- name: Run Psalm
run: composer psalm -- --shepherd