Skip to content

ci: add CodSpeed benchmark coverage #7

ci: add CodSpeed benchmark coverage

ci: add CodSpeed benchmark coverage #7

Workflow file for this run

name: Bench Go
on:
push:
branches:
- 'main'
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
permissions:
contents: read
id-token: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
benchmarks:
name: Run Go benchmarks
runs-on: rspack-ubuntu-22.04-large
steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
submodules: true
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: '1.26.0'
cache: false
- name: Setup CodSpeed
uses: ./.github/actions/setup-codspeed
with:
runner-version: '4.13.0'
installer-sha256: '55d150594275efb4a983b2f5626e84646269f42678f72554a26d6ce25b64e2d4'
- name: Run Go benchmarks
env:
GH_MATRIX: '${{ toJson(matrix) }}'
GH_STRATEGY: '${{ toJson(strategy) }}'
run: codspeed run --mode=walltime --go-runner-version=1.0.2 -- "go test -bench=. -benchtime=5s ./internal/linter ./cmd/rslint"