java #16
Workflow file for this run
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: Minimal setup | |
on: | |
pull_request_target: | |
branches: | |
- master | |
- bench | |
jobs: | |
benchmark: | |
name: Performance regression check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
# Run benchmark with `go test -bench` and stores the output to a file | |
- name: Run benchmark | |
run: ./gradlew jmh | |
# Download previous benchmark result from cache (if exists) | |
- name: Download previous benchmark data | |
uses: actions/cache@v1 | |
with: | |
path: ./cache | |
key: ${{ runner.os }}-benchmark | |
# Run `github-action-benchmark` action | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
# What benchmark tool the output.txt came from | |
tool: 'jmh' | |
# Where the output from the benchmark tool is stored | |
output-file-path: ./lib/build/results/jmh/results.json | |
# Where the previous data file is stored | |
external-data-json-path: ./cache/benchmark-data.json | |
# Workflow will fail when an alert happens | |
fail-on-alert: true | |
# GitHub API token to make a commit comment | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
# Enable alert commit comment | |
comment-on-alert: true | |
# Enable Job Summary for PRs | |
summary-always: true | |
# Mention @rhysd in the commit comment | |
alert-comment-cc-users: '@felldo' | |
# Upload the updated cache file for the next job by actions/cache |