diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a97d21f9..7cfd56ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,7 +71,22 @@ jobs: key: ${{ runner.os }}-${{ hashFiles('./tests/benchmarks/__init__.py') }} - name: Run Benchmark - run: python -m pytest --benchmark-only --benchmark-autosave --benchmark-columns 'min, max, mean, median' --benchmark-sort 'min' + run: python -m pytest --benchmark-only --benchmark-autosave --benchmark-columns 'min, max, mean, median' --benchmark-sort 'min' --benchmark-json output.json + + - name: Store and Compare benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + name: rio-tiler Benchmarks + tool: 'pytest' + output-file-path: output.json + alert-threshold: '130%' + comment-on-alert: true + fail-on-alert: true + # GitHub API token to make a commit comment + github-token: ${{ secrets.GITHUB_TOKEN }} + # Make a commit on `gh-pages` only if master + auto-push: ${{ github.ref == 'refs/heads/master' }} + benchmark-data-dir-path: benchmarks publish: needs: [tests]