-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,51 +44,32 @@ jobs: | |
--health-timeout 5s | ||
--health-retries 5 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
craftVersion: ["~3.7.33", "^4.2"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
|
||
- name: Create dynamic cache key | ||
id: cache-key | ||
env: | ||
CRAFT_VERSION: ${{ matrix.craftVersion }} | ||
run: | | ||
<?php | ||
$env = "DYNAMIC_CACHE_KEY=" . (getenv("CRAFT_VERSION") != "3.7.33" ? time() : ""); | ||
file_put_contents(getenv('GITHUB_OUTPUT'), $env, FILE_APPEND); | ||
shell: php -f {0} | ||
|
||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
composer.lock | ||
vendor | ||
key: ${{ runner.os }}-craft-vendor-${{ matrix.craftVersion }}-${{ steps.cache-key.outputs.DYNAMIC_CACHE_KEY }}-${{ hashFiles('composer.json') }} | ||
key: ${{ runner.os }}-craft-vendor-${{ hashFiles('composer.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-craft-vendor-~3.7.33- | ||
${{ runner.os }}-craft-vendor- | ||
- name: Install dependencies | ||
run: composer update --with "craftcms/cms:~3.7.33" --prefer-dist --no-progress | ||
run: composer install --prefer-dist --no-progress | ||
|
||
- name: Copy config files | ||
run: mkdir -p ./storage && cp -r ./stubs/config ./config | ||
|
||
- name: Install Craft | ||
run: ./src/bin/craft install --username=admin [email protected] --password=secret --siteName=Pest --siteUrl=http://localhost:8080 --language=en-US | ||
|
||
- name: Update to Craft ${{ matrix.craftVersion }} | ||
run: composer update --with "craftcms/cms:${{ matrix.craftVersion }}" -W && ./src/bin/craft migrate/all --no-backup=1 --interactive=0 | ||
if: matrix.craftVersion != '~3.7.33' | ||
|
||
- name: Generate compiled classes | ||
run: ./src/bin/craft pest/ide/generate-mixins | ||
|
||
|