Skip to content

chore: output benchmark results to tmp/benchmark (#403) #1087

chore: output benchmark results to tmp/benchmark (#403)

chore: output benchmark results to tmp/benchmark (#403) #1087

Workflow file for this run

name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
redis: [6.2]
steps:
- uses: actions/checkout@v2
- name: Get Deno version
run: |
echo "DENO_VERSION=$(cat .denov)" >> $GITHUB_ENV
- name: Set up Deno ${{ env.DENO_VERSION }}
uses: denoland/setup-deno@main
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: actions/cache@v3
with:
path: |
~/.deno
~/.cache/deno
key: ${{ runner.os }}-deno-${{ hashFiles('**/import_map.json', '**/.deno-version', '**/modules-lock.json') }}
- name: Check mod.ts
run: |
deno task make_mod
git diff --exit-code
deno check mod.ts
- name: Run lint
run: |
deno fmt --check
deno lint
- name: Set up Redis ${{ matrix.redis }}
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis }}
auto-start: "true"
- name: Run tests
run: |
deno task test
- name: Run doc tests
run: |
deno task test:doc
- name: Generate an lcov report
run: |
deno task coverage
- uses: k1LoW/octocov-action@v0
benchmark:
runs-on: ubuntu-latest
strategy:
matrix:
redis: [6.2]
steps:
- uses: actions/checkout@v2
- name: Get Deno version
run: |
echo "DENO_VERSION=$(cat .denov)" >> $GITHUB_ENV
- name: Set up Deno ${{ env.DENO_VERSION }}
uses: denoland/setup-deno@main
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: actions/cache@v3
with:
path: |
~/.deno
~/.cache/deno
key: ${{ runner.os }}-deno-benchmark-${{ hashFiles('**/import_map.json', '**/.deno-version', '**/modules-lock.json') }}
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "16"
- uses: bahmutov/npm-install@v1
with:
working-directory: benchmark
- name: Set up Redis ${{ matrix.redis }}
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis }}
auto-start: "true"
- name: Run benchmarks (ioredis)
run: |
deno task bench:ioredis
- name: Run benchmarks (deno-redis)
run: |
deno task bench:deno-redis
- name: Output results as a job summary
run: |
deno run --allow-read=tmp tools/format-benchmark-results.js >> $GITHUB_STEP_SUMMARY