-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade ci & tests. Run in deno, bun.
- Loading branch information
Showing
12 changed files
with
1,965 additions
and
1,903 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Publish release | ||
on: | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
jobs: | ||
publish-jsr: | ||
name: Publish to JSR.io | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 | ||
- run: npm install -g jsr | ||
- run: jsr publish | ||
publish-npm: | ||
name: Publish to NPM | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 | ||
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 | ||
with: | ||
node-version: 22 | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm publish --provenance --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
standalone: | ||
name: Upload files to GitHub Releases | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 | ||
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 | ||
with: | ||
node-version: 22 | ||
registry-url: 'https://registry.npmjs.org' | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run build | ||
- run: | | ||
cd build | ||
npm ci | ||
npm run build:release | ||
cd .. | ||
- run: gh release upload ${{ github.event.release.tag_name }} build/`npx jsbt outfile` | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.