diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6817f4480..b1fdcc2a7 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -56,7 +56,7 @@ jobs: - name: Benchmark if: ${{ steps.cpuCheck.outputs.match == 'true' }} run: node --expose-gc ./packages/benchmark/dist/index.js | tee output.txt - + - name: Download previous benchmark data if: ${{ steps.cpuCheck.outputs.match == 'true' }} uses: actions/cache@v3 @@ -70,23 +70,12 @@ jobs: tool: "benchmarkjs" output-file-path: output.txt external-data-json-path: benchmarksResult/data.json + - uses: actions/upload-artifact@v3 if: ${{ steps.cpuCheck.outputs.match == 'true' }} with: name: benchmarkResults path: benchmarksResult/data.json - - - name: Store benchmark result (Main) - uses: benchmark-action/github-action-benchmark@v1 - if: ${{ github.ref == 'refs/heads/main' && steps.cpuCheck.outputs.match == 'true' }} - with: - tool: "benchmarkjs" - output-file-path: output.txt - gh-pages-branch: "benchies" - benchmark-data-dir-path: benchmarksResult - github-token: ${{ secrets.GITHUB_TOKEN }} - auto-push: true - - name: Save Commmit SHA if: ${{ steps.cpuCheck.outputs.match == 'true' }} run: | @@ -98,3 +87,16 @@ jobs: with: name: commitData path: commitData/ + + - name: remove changes + run: git reset --hard HEAD + - name: Store benchmark result (Main) + uses: benchmark-action/github-action-benchmark@v1 + if: ${{ github.ref == 'refs/heads/main' && steps.cpuCheck.outputs.match == 'true' }} + with: + tool: "benchmarkjs" + output-file-path: output.txt + gh-pages-branch: "benchies" + benchmark-data-dir-path: benchmarksResult + github-token: ${{ secrets.GITHUB_TOKEN }} + auto-push: true diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index c29a7bb9d..8fc386ced 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -39,4 +39,4 @@ "tsconfig": "*", "typescript": "^4.9.3" } -} \ No newline at end of file +}