Skip to content

Commit

Permalink
[EXP] Add benchmark action
Browse files Browse the repository at this point in the history
  • Loading branch information
brionmario committed Apr 20, 2022
1 parent 16a0997 commit 2e4cc25
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# This workflow will build PRs submitted to the master branch.

name: Benchmark

on:
pull_request:
branches: [ re-architecture-benchmark ]
paths-ignore:
- "docs/**"
- "CONTRIBUTING.md"
- "CREDITS.md"
- "LICENSE"
- "pull_request_template.md"
- "README.md"
- "**/README.md"
- "SECURITY.md"
workflow_dispatch:

jobs:
benchmark:
name: ⬣ Benchmark
strategy:
matrix:
node-version: [ 12.x, 14.x, 16.x ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/[email protected]
with:
fetch-depth: 2

- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: 🛠️ Bootstrap Dependencies
id: bootstrap-dependencies-with-cache
run: |
npm install -g yarn
yarn install --frozen-lockfile
- name: 🏗️ Build
id: build-the-project
run: npx nx run-many --target=build --all --with-deps

- name: 🐱 Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

0 comments on commit 2e4cc25

Please sign in to comment.