added manual button update the benchmarks #11
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: Degradation test | |
on: | |
push: | |
branches: | |
- "**" | |
workflow_dispatch: # This allows the workflow to be manually triggered | |
jobs: | |
align: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup make | |
run: sudo apt-get update && sudo apt-get install make | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20.x" | |
- name: Tidy up dependencies | |
run: go mod tidy | |
- name: Install yq | |
run: sudo snap install yq | |
- name: Install benchstat | |
run: go install golang.org/x/perf/cmd/benchstat@latest | |
- name: Build degradation tester tool | |
run: | | |
cd ./scripts/degradation-tester | |
go install . | |
- name: Run degradation-test | |
run: | | |
make degradation-test | |
env: | |
GO111MODULE: on | |
update-benchmarks: # New job for updating the benchmarks | |
needs: align # This job runs after the 'align' job | |
if: github.event_name == 'workflow_dispatch' # Runs only when triggered manually | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Setup make | |
run: sudo apt-get update && sudo apt-get install make | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20.x" | |
- name: Tidy up dependencies | |
run: go mod tidy | |
- name: Update benchmarks | |
run: | | |
make update-benchmarks |