Skip to content

benchmarks

benchmarks #4

Workflow file for this run

name: Run benchmarks
on:
pull_request:
push:
branches:
- main
paths-ignore:
- README.md
jobs:
benchmarks:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-project
- uses: fregante/setup-git-user@v2
- uses: cachix/install-nix-action@v24
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: actions/cache@v3
with:
path: |
~/.ivy2/cache
~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
async-graphql/target
juniper/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Run benchmarks
run: cd ./benchmarks && nix-shell --quiet --run ./run.cr
- name: Comment on PR
if: github.event_name == 'pull_request'
uses: thollander/actions-comment-pull-request@v1
with:
message: "Benchmark Results:\n```$(cat benchmark-results.txt)```"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}