Skip to content

Commit

Permalink
CI: add meausing on duckdb-wasm npm library
Browse files Browse the repository at this point in the history
  • Loading branch information
carlopi authored and Mytherin committed Jan 18, 2024
1 parent 13e7f43 commit 45883a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,10 @@ jobs:
name: duckdb-wasm-packages-loadable
path: duckdb-wasm-packages.zip

- name: Measure NPM stats
run: |
./scripts/npm_measure_lib.sh
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
Expand Down
12 changes: 12 additions & 0 deletions scripts/npm_measure_lib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

PROJECT_ROOT="$(cd $(dirname "$BASH_SOURCE[0]") && cd .. && pwd)" &> /dev/null

cd ${PROJECT_ROOT}/packages/duckdb-wasm
mkdir -p ./dist/img
cp ${PROJECT_ROOT}/misc/duckdb.svg ./dist/img/duckdb.svg
cp ${PROJECT_ROOT}/misc/duckdb_wasm.svg ./dist/img/duckdb_wasm.svg
${PROJECT_ROOT}/scripts/build_duckdb_badge.sh > ./dist/img/duckdb_version_badge.svg

npm install -g pkg-size
pkg-size .

0 comments on commit 45883a5

Please sign in to comment.