Skip to content

perf: improve getMetricAsString for long strings + less allocations #513

perf: improve getMetricAsString for long strings + less allocations

perf: improve getMetricAsString for long strings + less allocations #513

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- master
- main
- next
pull_request:
branches:
- '**'
jobs:
build:
name: Test on Node.js v${{ matrix.node-version }} and OS ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [14.x, 16.x, 18.x, 19.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Restore dependencies cache
uses: actions/cache@v3
id: cache
with:
path: node_modules
key: ${{ matrix.os }}-${{ matrix.node-version }}-node_modules-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.node-version }}-node_modules-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm i
- name: Test
run: npm run test