Skip to content

Merge pull request #2 from tailcallhq/benchmark-ci #1

Merge pull request #2 from tailcallhq/benchmark-ci

Merge pull request #2 from tailcallhq/benchmark-ci #1

Workflow file for this run

name: "Run benchmark"
on:
pull_request_target:
types: [assigned, opened, synchronize, reopened, edited]
push:
branches:
- main
permissions:
contents: write
packages: write
pull-requests: write
issues: write
jobs:
build:
runs-on: benchmarking-runner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ github.repository_owner }}/federated-benchmark:latest
cache-from: type=gha
cache-to: type=gha,mode=max
benchmark:
needs: build
runs-on: benchmarking-runner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
response:
[
big
medium
small
]
service:
[
# the theoretical maximum
source_graphql,
source_rest_api,
# nginx -> source: the baseline for comparison
nginx_graphql,
nginx_rest_api,
# tailcall configurations
tailcall_default,
tailcall_tweaks,
tailcall_http_cache,
tailcall_cache_dir,
tailcall_dedupe_op,
tailcall_full_conf,
# wundergraph configurations
wundergraph_no_opt,
wundergraph_dedupe,
wundergraph_default,
# apollo
apollo_router,
# grafbase
grafbase_default,
grafbase_cache
]
steps:
- name: Benchmark
uses: addnab/docker-run-action@v3
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
image: federated-benchmark:latest
run: docker_benchmark.sh ${{ matrix.response }} ${{ matrix.service }}