X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=.github%2Fworkflows%2Fbenchmark.yml;h=68f07da7e3e30c9a01fe8b14419d7a7b54952959;hb=6a3d196a75cb6923b24d5b459777d44498fe072c;hp=093c450f951c2d4143a5d7c93da5e67f9db6a60c;hpb=93874800882e2c7f375359e7339ef55fdb4fb4bc;p=poolifier.git diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 093c450f..68f07da7 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -1,39 +1,44 @@ name: Benchmark on: - workflow_dispatch: + push: + branches: + - master + +permissions: + contents: write + deployments: write jobs: internal-benchmark: - strategy: - matrix: - os: [windows-latest, macos-latest, ubuntu-latest] - node: ['16.x', '18.x', '20.x'] - - name: Internal benchmark with Node.js ${{ matrix.node }} on ${{ matrix.os }} - - runs-on: ${{ matrix.os }} - + if: github.repository == 'poolifier/poolifier' + name: Internal benchmark + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup pnpm uses: pnpm/action-setup@v2 with: version: 8 - - - name: Setup Node.js ${{ matrix.node }} + - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node }} + node-version: '18.x' cache: 'pnpm' - - - name: Install + - name: Install dependencies run: pnpm install --ignore-scripts - - - name: Build - run: pnpm build - - - name: Benchmark - run: pnpm benchmark + - name: Run production benchmark + run: pnpm benchmark:prod | tee ./benchmarks/internal/output.txt + - name: Store production benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + name: Internal benchmark + tool: 'benchmarkjs' + output-file-path: ./benchmarks/internal/output.txt + github-token: ${{ secrets.BENCHMARK_RESULTS_TOKEN }} + auto-push: true + alert-threshold: '200%' + comment-on-alert: true + fail-on-alert: true + gh-repository: 'github.com/poolifier/benchmark-results'