Skip to content

Async gql cache hackathon test #113

Async gql cache hackathon test

Async gql cache hackathon test #113

name: Benchmark PR
on:
pull_request:
paths: ["projects/**"]
types: [opened, reopened, synchronize, labeled]
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmarks_stub:
name: Run benchmarks for pr
if: "${{ !contains(github.event.pull_request.labels.*.name, 'ci: benchmark') }}"
runs-on: ubuntu-latest
steps:
- run: echo "Fake job if label is not set"
benchmarks:
name: Run benchmarks for pr
if: "${{ contains(github.event.pull_request.labels.*.name, 'ci: benchmark') }}"
runs-on: benchmarking-runner
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: projects/${{ github.event.pull_request.head.repo.owner.login }}/**
- name: Check for unrelated changes
if: steps.changed-files.outputs.other_modified_files_count != 0
run: |
echo "Found changes in the files outside of the participant project folder"
echo "Check the rules and make changes/additions only inside projects/${{ github.event.pull_request.head.repo.owner.login }}"
echo "Following files have changes:"
echo ${{ steps.changed-files.outputs.other_modified_files }}
exit 1
- name: Install Stable Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install Wrk
run: sudo apt-get update && sudo apt-get install -y wrk
- name: Install Tools for reference implementation
run: npm i -g @tailcallhq/tailcall
- name: Build mock-server
run: cargo build -p mock-api --release
- name: Run Benchmarks
run: cargo run -- --project ${{ github.event.pull_request.head.repo.owner.login }}
- name: Generate comment
run: ./comment.sh $( cat results/${{ github.event.pull_request.head.repo.owner.login }}/score.out )
- name: Show comment body
run: cat body.md
- name: "Upload Artifact"
uses: actions/upload-artifact@v4
with:
name: body
path: body.md