Skip to content

Commit

Permalink
Merge pull request #3357 from jrfnl/feature/ghactions-cache-busting
Browse files Browse the repository at this point in the history
GH Actions: bust the cache semi-regularly
  • Loading branch information
jaapio committed Nov 19, 2022
2 parents f3b5f9b + b896832 commit 546a129
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/push.yml
Expand Up @@ -49,6 +49,8 @@ jobs:
uses: "ramsey/composer-install@v2"
with:
composer-options: --optimize-autoloader
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")

- name: composer-require-checker
run: composer-require-checker check --config-file $GITHUB_WORKSPACE/composer-require-config.json composer.json
Expand Down Expand Up @@ -89,6 +91,8 @@ jobs:
uses: "ramsey/composer-install@v2"
with:
composer-options: --optimize-autoloader
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")

- name: Install PHPUnit extensions
run: mkdir -p tools/phpunit.d && curl -sL https://github.com/jaapio/prophecy-phpunit/releases/download/v2.2.0/prophecy-phpunit.phar --output tools/phpunit.d/prophecy-phpunit.phar
Expand Down Expand Up @@ -156,6 +160,8 @@ jobs:
uses: "ramsey/composer-install@v2"
with:
composer-options: --optimize-autoloader
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")

- name: PHPStan
uses: phpDocumentor/phpstan-ga@1.8
Expand Down Expand Up @@ -200,6 +206,8 @@ jobs:
uses: "ramsey/composer-install@v2"
with:
composer-options: --optimize-autoloader
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")

- name: Psalm
run: php bin/psalm.phar --output-format=github
Expand Down Expand Up @@ -243,6 +251,8 @@ jobs:
uses: "ramsey/composer-install@v2"
with:
composer-options: --optimize-autoloader
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")

- name: warm cache
uses: phpDocumentor/phar-ga@latest
Expand Down Expand Up @@ -327,6 +337,8 @@ jobs:
uses: "ramsey/composer-install@v2"
with:
composer-options: --optimize-autoloader
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")

- name: Install PHPUnit extensions
run: mkdir -p tools/phpunit.d && curl -sL https://github.com/jaapio/prophecy-phpunit/releases/download/v2.2.0/prophecy-phpunit.phar --output tools/phpunit.d/prophecy-phpunit.phar
Expand Down Expand Up @@ -377,6 +389,8 @@ jobs:
uses: "ramsey/composer-install@v2"
with:
composer-options: --optimize-autoloader
# Bust the cache at least once a month - output format: YYYY-MM-DD.
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")

- name: Build example project template
run: ./bin/phpdoc --template=${{ matrix.template }} -vvv --config=data/examples/MariosPizzeria/phpdoc.xml --target=build/${{ matrix.template }} --setting="guides.enabled=false"
Expand Down

0 comments on commit 546a129

Please sign in to comment.