Skip to content

Commit 99d2424

Browse files
minor #49001 Speed up Psalm tests (danepowell)
This PR was submitted for the 6.3 branch but it was squashed and merged into the 5.4 branch instead. Discussion ---------- Speed up Psalm tests | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> <!-- Replace this notice by a short README for your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> The setupphp maintainer [recommends caching the couchbase extension](shivammathur/setup-php#593 (comment)) using the [cache-extensions action](https://github.com/shivammathur/cache-extensions). This should speed up Psalm runs from 14 minutes to 2 minutes! Commits ------- 89be707 Speed up Psalm tests
2 parents 737cc4c + 89be707 commit 99d2424

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/psalm.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,30 @@ jobs:
1919
name: Psalm
2020
runs-on: Ubuntu-20.04
2121

22+
env:
23+
php-version: '8.1'
24+
extensions: json,couchbase,memcached,mongodb,redis,xsl,ldap,dom
2225
steps:
26+
- name: Setup cache environment
27+
id: extcache
28+
uses: shivammathur/cache-extensions@v1
29+
with:
30+
php-version: ${{ env.php-version }}
31+
extensions: ${{ env.extensions }}
32+
key: cache-v1 # can be any string, change to clear the extension cache.
33+
34+
- name: Cache extensions
35+
uses: actions/cache@v3
36+
with:
37+
path: ${{ steps.extcache.outputs.dir }}
38+
key: ${{ steps.extcache.outputs.key }}
39+
restore-keys: ${{ steps.extcache.outputs.key }}
40+
2341
- name: Setup PHP
2442
uses: shivammathur/setup-php@v2
2543
with:
26-
php-version: '8.1'
27-
extensions: "json,couchbase,memcached,mongodb,redis,xsl,ldap,dom"
44+
php-version: ${{ env.php-version }}
45+
extensions: ${{ env.extensions }}
2846
ini-values: "memory_limit=-1"
2947
coverage: none
3048

0 commit comments

Comments
 (0)