benchmarks #8
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: 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.json') }} | |
- name: Run benchmarks | |
working-directory: ./benchmarks | |
run: 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 }} |