Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

chore(ops): setup bun #399

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,33 @@ jobs:
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- run: corepack enable pnpm
- name: Install bun
uses: oven-sh/setup-bun@a1800f471a0bc25cddac36bb13e6f436ddf341d7

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version-file: ".nvmrc"
cache: pnpm
cache: bun

- run: pnpm install --frozen-lockfile
- run: bun install --frozen-lockfile

- run: pnpm build
- run: bun build

Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- run: corepack enable pnpm
- name: Install bun
uses: oven-sh/setup-bun@a1800f471a0bc25cddac36bb13e6f436ddf341d7

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version-file: ".nvmrc"
cache: pnpm
cache: bun

- run: pnpm install --frozen-lockfile
- run: pnpm test -- -- --maxWorkers=100% --coverage
- run: bun install --frozen-lockfile
- run: bun test -- -- --maxWorkers=100% --coverage

# TODO(thedoublejay): add when there are test cases
# - uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # tag=v3.1.1
Expand All @@ -53,30 +55,32 @@ jobs:
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- run: corepack enable pnpm
- name: Install bun
uses: oven-sh/setup-bun@a1800f471a0bc25cddac36bb13e6f436ddf341d7

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version-file: ".nvmrc"
cache: pnpm
cache: bun

- run: pnpm install --frozen-lockfile
- run: bun install --frozen-lockfile

- run: pnpm prettier --check .
- run: bun prettier --check .

lint_eslint:
name: Lint (eslint)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- run: corepack enable pnpm
- name: Install bun
uses: oven-sh/setup-bun@a1800f471a0bc25cddac36bb13e6f436ddf341d7

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version-file: ".nvmrc"
cache: pnpm
cache: bun

- run: pnpm install --frozen-lockfile
- run: bun install --frozen-lockfile

- run: pnpm turbo run lint
- run: bun turbo run lint
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,23 @@ jobs:
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- run: corepack enable pnpm
- name: Install bun
uses: oven-sh/setup-bun@a1800f471a0bc25cddac36bb13e6f436ddf341d7

- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version-file: ".nvmrc"
cache: pnpm
cache: bun

- run: pnpm install --frozen-lockfile
- run: bun install --frozen-lockfile

- run: pnpm -r exec npm version ${{ needs.version.outputs.result }} --git-tag-version=false
- run: bun -r exec npm version ${{ needs.version.outputs.result }} --git-tag-version=false

- run: pnpm build
- run: bun build

- run: npm config set "//registry.npmjs.org/:_authToken" "\${NPM_AUTH_TOKEN}" --location=project

- run: pnpm -r publish --access public --tag latest --no-git-checks
- run: bun -r publish --access public --tag latest --no-git-checks
env:
NPM_AUTH_TOKEN: ${{ secrets.WAVESHQ_NPM_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
node_modules
dist
package-lock.json
pnpm-lock.yaml
bun.lockb
Binary file added bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@waveshq/standard",
"version": "0.0.0",
"workspaces": ["packages/*"],
"private": true,
"files": [],
"scripts": {
Expand All @@ -24,6 +25,6 @@
},
"engines": {
"node": ">=18.0.0",
"pnpm": ">=8.7.5"
"bun": ">=1.0.1"
}
}
Loading
Loading