diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..94bb88d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: Test +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - run: npm install + - run: cargo install wasm-pack --version 0.13.1 + - run: make bindgen + - run: make build + - run: npm test diff --git a/package.json b/package.json index 23ab80a..4ec4aad 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,9 @@ "url": "git+https://github.com/kateinoigakukun/wasm-memprof.git" }, "type": "module", + "scripts": { + "test": "node ./test/smoke.test.js" + }, "exports": { ".": { "module": "./dist/wasm-memprof.js",