Skip to content

Commit

Permalink
build: switch to bun for dep management
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRBerg committed Dec 31, 2023
1 parent 78e991a commit 46e86f7
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 32 deletions.
40 changes: 11 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,14 @@ jobs:
- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "yarn"
node-version: "lts/*"

- name: "Install Yarn"
run: "npm install -g yarn"
- name: "Install Bun"
uses: "oven-sh/setup-bun@v1"

- name: "Install the Node.js dependencies"
run: "yarn install"
run: "bun install"

- name: "Lint the contracts"
run: "yarn lint"
- name: "Lint the code"
run: "bun run lint"

- name: "Add lint summary"
run: |
Expand All @@ -50,17 +44,11 @@ jobs:
- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "yarn"
node-version: "lts/*"

- name: "Install Yarn"
run: "npm install -g yarn"
- name: "Install Bun"
uses: "oven-sh/setup-bun@v1"

- name: "Install the Node.js dependencies"
run: "yarn install"
run: "bun install"

- name: "Build the contracts and print their size"
run: "forge build --sizes"
Expand All @@ -80,17 +68,11 @@ jobs:
- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install Node.js"
uses: "actions/setup-node@v3"
with:
cache: "yarn"
node-version: "lts/*"

- name: "Install Yarn"
run: "npm install -g yarn"
- name: "Install Bun"
uses: "oven-sh/setup-bun@v1"

- name: "Install the Node.js dependencies"
run: "yarn install"
run: "bun install"

- name: "Show the Foundry config"
run: "forge config"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ out
.DS_Store
.pnp.*
lcov.info
package-lock.json
pnpm-lock.yaml
yarn.lock

# broadcasts
!broadcast
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# directories
broadcast
cache
lib
node_modules
out

Expand All @@ -11,6 +10,7 @@ out
.DS_Store
.pnp.*
lcov.info
bun.lockb
package-lock.json
pnpm-lock.yaml
yarn.lock
Binary file added bun.lockb
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"repository": "github.com:sablier-labs/sablier-integration-template",
"scripts": {
"clean": "rm -rf cache out",
"lint": "yarn lint:sol && yarn prettier:check",
"lint:sol": "forge fmt --check && yarn solhint \"{script,src,test}/**/*.sol\"",
"lint": "bun run lint:sol && bun run prettier:check",
"lint:sol": "forge fmt --check && bun solhint \"{script,src,test}/**/*.sol\"",
"prettier:check": "prettier --check \"**/*.{json,md,yml}\"",
"prettier:write": "prettier --write \"**/*.{json,md,yml}\""
}
Expand Down

0 comments on commit 46e86f7

Please sign in to comment.