diff --git a/.github/workflows/test-js.yml b/.github/workflows/test-js.yml index 9dc3754..745e0d3 100644 --- a/.github/workflows/test-js.yml +++ b/.github/workflows/test-js.yml @@ -1,64 +1,3 @@ -name: Run JS tests -on: - - push - - pull_request jobs: - bun: - name: Bun - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 - - uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1 - - run: bun install - - run: bun run build - - run: bun test/index.js - deno: - name: Deno - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 - - uses: denoland/setup-deno@909cc5acb0fdd60627fb858598759246509fa755 # v2.0.2 - - run: deno install - - run: deno task build - - run: deno --allow-env --allow-read --allow-write test/index.js - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 - - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 - with: - registry-url: 'https://registry.npmjs.org' - cache: npm - - run: npm install - - run: npm run build --if-present - - run: npm run lint --if-present - node: - name: Node v${{ matrix.node }} - runs-on: ubuntu-latest - strategy: - matrix: - node: [14, 16, 18, 20, 22] - steps: - - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 - - name: Use Node.js ${{ matrix.node }} - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 - with: - node-version: ${{ matrix.node }} - registry-url: 'https://registry.npmjs.org' - cache: npm - - run: npm install - - run: npm run build --if-present - - run: npm test - coverage: - name: Measure coverage on Node - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 - - uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 - with: - registry-url: 'https://registry.npmjs.org' - cache: npm - - run: npm install - - run: npm run build --if-present - - run: npm run test:coverage --if-present + test-js: + uses: paulmillr/jsbt/workflows/test-js.yml@1e90a8a1cb62eb06c27101a6a3b96f800dfd23a9 diff --git a/package.json b/package.json index b3b37f1..cbb700e 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,9 @@ "build:release": "tsc && tsc -p tsconfig.esm.json", "lint": "prettier --check src", "format": "prettier --write 'src/**/*.{js,ts}' 'test/*.js'", - "test": "node test/index.js" + "test": "node test/index.js", + "test:bun": "bun test/index.js", + "test:deno": "deno --allow-env --allow-read test/index.js" }, "author": "Paul Miller (https://paulmillr.com)", "license": "MIT",