nodejs-resolver 0.1.1

nodejs resolve
Documentation
name: bench

on:
  push:
    branches:
      - main
    tags-ignore:
      - "**"
    paths-ignore:
      - "**/*.md"
      - LICENSE
      - "**/*.gitignore"
      - .editorconfig
  pull_request: null

jobs:
  benchmark:
    strategy:
      fail-fast: false
      matrix:
        manager: [npm, pnpm]
    runs-on: ubuntu-latest
    permissions: write-all
    steps:
      - uses: actions/checkout@v3

      - name: Install toolchain
        run: rustup show

      - uses: actions/setup-node@v3
        with:
          node-version: 16
          cache: npm
          cache-dependency-path: bench/package-lock.json

      - name: Cache
        uses: Swatinem/rust-cache@v2

      - name: Generate bench case and run
        run: |
          cd ./bench
          bash ./scripts/run.sh ${{ matrix.manager }}
          cd ..

      - name: Download previous benchmark data
        uses: actions/cache@v3
        with:
          path: ./cache
          key: ${{ runner.os }}-${{ matrix.manager }}-benchmark

      - name: Store benchmark result
        uses: benchmark-action/github-action-benchmark@v1
        with:
          tool: "cargo"
          output-file-path: ./bench/rs_bench.txt
          external-data-json-path: ./cache/benchmark-data.json
          comment-always: true
          github-token: ${{ secrets.GITHUB_TOKEN }}