Skip to content

Commit

Permalink
feat: phpstan caching (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulredmond authored Jul 20, 2023
1 parent 12caaad commit d82444b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/php-stan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ on:
required: false
type: string
default: "phpstan-errors"
cache_path:
description: "The tmpDir path (i.e. ./.phpstan.cache)"
required: false
type: string
default: "./.phpstan.cache"
secrets:
packagist_username:
required: true
Expand Down Expand Up @@ -55,6 +60,14 @@ jobs:
- name: Install composer dependencies
uses: ramsey/composer-install@v2

- name: Cache PHPStan Results
uses: actions/cache@v3
with:
path: ${{ inputs.cache_path }}
key: "${{ runner.os }}-phpstan-${{ github.run_id }}" # always unique key - always writes a new cache
restore-keys: |
${{ runner.os }}-phpstan-
- name: Run PHPStan
run: ${{ inputs.command }}
env:
Expand Down

0 comments on commit d82444b

Please sign in to comment.