Skip to content

Commit

Permalink
Fix for wrong cache data & key in benchmark baseline action (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd authored Oct 30, 2023
1 parent 3dc8e84 commit 7c324ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/benchmark-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,6 @@ jobs:
- name: "Install locked dependencies"
run: "composer install --no-interaction --no-progress"

- name: Get Date
id: get-date
run: |
echo "date=$(date -u "+%Y%m%d%H%M%S")" >> $GITHUB_OUTPUT
shell: bash

- name: "Restore Benchmark cache"
uses: "actions/cache@v3"
with:
path: "var/phpbench"
key: "php-${{ matrix.php-version }}-${{ env.PHPBENCH_TAG }}-phpbench-${{ steps.get-date.outputs.date }}"
restore-keys: |
php-${{ matrix.php-version }}-${{ env.PHPBENCH_TAG }}-phpbench-
- name: "Benchmark"
run: |
echo '# Flow PHP - Benchmark - ${{ env.PHPBENCH_TAG }}' >> $GITHUB_STEP_SUMMARY
Expand All @@ -103,3 +89,9 @@ jobs:
echo '```' >> $GITHUB_STEP_SUMMARY
composer test:benchmark -- --tag=${{ env.PHPBENCH_TAG }} --progress=none >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: "Store Benchmark baseline"
uses: actions/upload-artifact@v3
with:
name: phpbench-baseline
path: ./var/phpbench/
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"test:benchmark": [
"@test:benchmark:building_blocks",
"@test:benchmark:extractor",
"@test:benchmark:loader,",
"@test:benchmark:loader",
"@test:benchmark:transformer"
],
"test:benchmark:building_blocks": [
Expand Down

0 comments on commit 7c324ad

Please sign in to comment.