Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

ci: add benchmark workflow for @notesnook/web

Abdullah Atta0df8f80b48b3
diff --git a/.github/workflows/web.benchmarks.yml b/.github/workflows/web.benchmarks.yml
new file mode 100644
index 000000000..7c59ec49f
--- /dev/null
+++ b/.github/workflows/web.benchmarks.yml
@@ -0,0 +1,42 @@
+name: Benchmark @notesnook/web
+
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - "master"
+ paths:
+ - "apps/web/**"
+ # re-run workflow if workflow file changes
+ - ".github/workflows/web.benchmarks.yml"
+ pull_request:
+
+jobs:
+ bench:
+ name: Bench
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Setup Node
+ uses: ./.github/actions/setup-node-with-cache
+
+ - name: Install packages
+ run: |
+ npm ci --ignore-scripts --prefer-offline --no-audit
+ npm run bootstrap -- --scope=web
+
+ - name: Setup environment
+ run: |
+ echo "NX_CLOUD_ACCESS_TOKEN=${{ secrets.NX_CLOUD_ACCESS_TOKEN }}" >> $GITHUB_ENV
+
+ - name: Build
+ run: npm run build:web
+
+ - name: Run benchmarks
+ uses: CodSpeedHQ/action@v3
+ with:
+ run: node __bench__/app.bench.mjs
+ working-directory: apps/web
+ token: ${{ secrets.CODSPEED_TOKEN }}