From ec7f77527a23f85c0f72f8a347ecf16dea324ef2 Mon Sep 17 00:00:00 2001 From: Dany Castillo <31006608+dcastil@users.noreply.github.com> Date: Sun, 18 Aug 2024 18:39:11 +0200 Subject: [PATCH] move benchmark job to test workflow --- .github/workflows/benchmark.yml | 32 -------------------------------- .github/workflows/test.yml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 32 deletions(-) delete mode 100644 .github/workflows/benchmark.yml diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 6f3e5ff..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: benchmark - -on: - push: - branches: - - 'main' - pull_request: - workflow_dispatch: - -jobs: - benchmarks: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Use Node.js 20 - uses: actions/setup-node@v4 - with: - node-version: 20.11.1 - - name: Use node_modules cache - uses: actions/cache@v4 - with: - path: node_modules - key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }} - restore-keys: | - yarn-node-20-lock- - - run: yarn install --frozen-lockfile - - run: yarn bench - - name: Run benchmarks - uses: CodSpeedHQ/action@v3 - with: - token: ${{ secrets.CODSPEED_TOKEN }} - run: 'yarn bench' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15d204d..2b76ae0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,3 +32,24 @@ jobs: path: dist if-no-files-found: error - run: yarn test:exports + benchmark: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20.11.1 + - name: Use node_modules cache + uses: actions/cache@v4 + with: + path: node_modules + key: yarn-node-20-lock-${{ hashFiles('yarn.lock') }} + restore-keys: | + yarn-node-20-lock- + - run: yarn install --frozen-lockfile + - name: Run benchmark + uses: CodSpeedHQ/action@v3 + with: + token: ${{ secrets.CODSPEED_TOKEN }} + run: yarn bench