From 88435043a21434b00ee1bbcaac172f6a23e8e271 Mon Sep 17 00:00:00 2001 From: Boshen Date: Mon, 8 Jul 2024 21:26:21 +0800 Subject: [PATCH] add ci --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ .node-version | 1 + 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .node-version diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b910783 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + workflow_dispatch: + pull_request: + types: [opened, synchronize] + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.ref_name != 'main' }} + +jobs: + benchmark: + name: Benchmark + runs-on: ubuntu-latest + steps: + - uses: taiki-e/checkout-action@v1 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version-file: .node-version + cache: pnpm + + - run: pnpm run bench diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..48b14e6 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20.14.0