Skip to content

Add benchmarks to GHA #2

Add benchmarks to GHA

Add benchmarks to GHA #2

Workflow file for this run

---
name: "Benchmarks"
on: # yamllint disable-line rule:truthy
push:
branches:
- "main"
pull_request:
branches:
- "*"
merge_group:
types:
- "checks_requested"
env:
GO_VERSION: "~1.20.5"
jobs:
go-bench:

Check failure on line 16 in .github/workflows/benchmark.yaml

View workflow run for this annotation

GitHub Actions / Benchmarks

Invalid workflow file

The workflow is not valid. .github/workflows/benchmark.yaml (Line: 16, Col: 3): The workflow must contain at least one job with no dependencies.
name: "Go Benchmark"
runs-on: ["self-hosted", "benchmarks"]
needs: "unit"
steps:
- uses: "actions/checkout@v3"
- uses: "authzed/actions/setup-go@main"
with:
go-version: "${{ env.GO_VERSION }}"
- name: "Benchmark"
run: "go run mage.go test:bench | tee benchmarks.txt"
- name: "Download previous benchmark data"
uses: "actions/cache@v1"
with:
path: "./cache"
key: "${{ runner.os }}-benchmark"
- uses: "benchmark-action/github-action-benchmark@v1"
with:
tool: "go"
output-file-path: "benchmarks.txt"
save-data-file: "${{ github.ref_name == 'main' }}"
external-data-json-path: "./cache/benchmark-data.json"
github-token: "${{ github.token }}"
auto-push: false
comment-on-alert: true
summary-always: true