Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up Psalm tests #49001

Merged
merged 1 commit into from
Feb 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/psalm.yml
Expand Up @@ -19,12 +19,30 @@ jobs:
name: Psalm
runs-on: Ubuntu-20.04

env:
php-version: '8.1'
extensions: json,couchbase,memcached,mongodb,redis,xsl,ldap,dom
steps:
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ env.php-version }}
extensions: ${{ env.extensions }}
key: cache-v1 # can be any string, change to clear the extension cache.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on 6.3 the list of extensions is not the same as on 6.2/5.4
shouldn't we vary this by php-version + extensions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't used GitHub Actions caching much, but I think it will attempt to restore the cache from the current branch before falling back to the default branch. So there shouldn't be any harm in reusing a cache key across branches.


- name: Cache extensions
javiereguiluz marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/cache@v3
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: "json,couchbase,memcached,mongodb,redis,xsl,ldap,dom"
php-version: ${{ env.php-version }}
extensions: ${{ env.extensions }}
ini-values: "memory_limit=-1"
coverage: none

Expand Down