ci: Use benchmark-action/github-action-benchmark #5
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
name: Benchmark | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Run JMH | |
run: | | |
./gradlew benchmark | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: JMH Benchmark | |
tool: 'jmh' | |
output-file-path: build/results/jmh/results.json | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
auto-push: false | |
alert-threshold: '200%' | |
comment-on-alert: true | |
fail-on-alert: true | |
alert-comment-cc-users: '@sya-ri' | |
summary-always: true | |
- name: Install SSH Client 🔑 | |
uses: webfactory/ssh-agent@v0.7.0 | |
with: | |
ssh-private-key: ${{ secrets.BENCHMARK_DEPLOY_KEY }} | |
- name: Push benchmark result | |
run: git push 'git@github.com:sya-ri-bot/ktConfig-benchmark.git' gh-pages:gh-pages |