From 2e1f0034dbf915f48615d0a8bb35e9f09c81b751 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 10 Jan 2023 10:54:16 -0800 Subject: [PATCH] gh actions workflow for benchmarks --- .github/workflows/benchmark.yml | 39 +++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/benchmark.yml diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml new file mode 100644 index 00000000..f2f4b6a6 --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -0,0 +1,39 @@ +name: 'benchmarks' + +on: workflow_dispatch + +jobs: + benchmark: + strategy: + matrix: + node-version: [14.0.x, 14.x, 16.0.x, 16.x, 18.0.x, 18.x, 19.x] + platform: + - os: ubuntu-latest + - os: macos-latest + - os: windows-latest + + runs-on: ${{ matrix.platform.os }} + + defaults: + run: + shell: bash + + steps: + - name: Checkout Repository + uses: actions/checkout@v1.1.0 + + - name: Use Nodejs ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - name: benchmark + run: node benchmark/index.js + env: + - RIMRAF_TEST_START_CHAR: a + - RIMRAF_TEST_END_CHAR: j + - RIMRAF_TEST_DEPTH: 7 + - RIMRAF_TEST_ITERATIONS: 7