Skip to content

fix(testing): emit StopBenchmark command even when benches failed #333

fix(testing): emit StopBenchmark command even when benches failed

fix(testing): emit StopBenchmark command even when benches failed #333

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-go@v5
- uses: moonrepo/setup-rust@v1
- uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
tests:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.24.x', '1.25.x']
env:
# Needed for the quic-go test
GOEXPERIMENT: ${{ matrix.go-version == '1.24.x' && 'synctest' || '' }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- uses: taiki-e/install-action@cargo-nextest
- uses: moonrepo/setup-rust@v1
- run: |
cd go-runner
cargo nextest run --all
env:
CODSPEED_GO_PKG_VERSION: ${{ github.head_ref || github.ref_name }}
verify-fork-scripts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-go@v5
- uses: pre-commit/action@v3.0.1
- name: Run fork.sh scripts and verify no diffs
run: |
cd testing
./fork.sh 1.25
cd ..
if ! git diff --exit-code testing/ > /dev/null 2>&1; then
exit 1
fi
compat-integration-test-walltime:
runs-on: codspeed-macro
strategy:
matrix:
target: [example, example/compat, example/timing, example/very/nested/module]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-go@v5
- uses: moonrepo/setup-rust@v1
with:
cache-target: release
- name: Run the benchmarks
uses: CodSpeedHQ/action@main
env:
CODSPEED_GO_PKG_VERSION: ${{ github.head_ref || github.ref_name }}
with:
mode: walltime
working-directory: example
run: cargo r --release --manifest-path ../go-runner/Cargo.toml -- test -bench=. ${{ matrix.target }}
go-runner-benchmarks:
runs-on: codspeed-macro
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- name: Setup rust toolchain, cache and cargo-codspeed binary
uses: moonrepo/setup-rust@v1
with:
channel: stable
cache-target: release
bins: cargo-codspeed
- uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Build the benchmark target(s)
run: cargo codspeed build -m walltime
- name: Run the benchmarks
uses: CodSpeedHQ/action@v4
with:
mode: walltime
run: cargo codspeed run
check:
runs-on: ubuntu-latest
if: always()
needs:
- lint
- tests
- verify-fork-scripts
- compat-integration-test-walltime
- go-runner-benchmarks
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJson( needs ) }}