fix(test): update telemetry tests #180
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: Benchmark | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "**/*.go" | |
- "go.sum" | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
benchmark: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
DEBUG: true | |
services: | |
redis: | |
image: redis:6.0-alpine | |
ports: ["6379:6379"] | |
options: --health-cmd="redis-cli ping" --health-interval 1s --health-timeout 3s --health-retries 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: go.mod | |
- name: Install system deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install bison | |
- name: Install websocket-bench & gops | |
run: | | |
go install github.com/anycable/websocket-bench@latest | |
go install github.com/google/gops@latest | |
- uses: ruby/setup-ruby@v1 | |
with: | |
# Use <3.0 since go-mruby's Rakefile has some problems with keyword arguments compatibility | |
ruby-version: 2.7 | |
bundler-cache: true | |
- uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: vendor-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
vendor- | |
- run: go mod vendor | |
- name: Build mruby | |
run: bash -c '(cd vendor/github.com/mitchellh/go-mruby && MRUBY_CONFIG=../../../../../../etc/build_config.rb make libmruby.a)' | |
- name: Build test binary | |
env: | |
BUILD_ARGS: "-race" | |
run: | | |
make build | |
- name: Run benchmarks | |
run: | | |
bundle install | |
make benchmarks |