Skip to content

Commit

Permalink
Cache action dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpost committed Jan 18, 2025
1 parent 2fe8587 commit 83b43e8
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,26 @@ jobs:
php-version: '8.3'
extensions: mbstring, intl, pdo_sqlite, sqlite3
tools: composer, wp
- name: Install Dependencies
run: composer install
- name: Get Composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --prefer-dist --no-progress
- name: Cache WordPress
id: cache-wordpress
uses: actions/cache@v4
with:
path: tests/_wordpress
key: wordpress-6.7
- name: Install WordPress
if: steps.cache-wordpress.outputs.cache-hit != 'true'
run: |
mkdir -p tests/_wordpress
wp core download --allow-root --version=6.7 --path=tests/_wordpress
Expand Down

0 comments on commit 83b43e8

Please sign in to comment.