mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 01:38:32 +00:00
chore: pin Bun version and migrate to bun.lock (#290)
## Summary Pins Bun version to 1.3.2 and migrates workflows to use text-based `bun.lock` instead of binary `bun.lockb`. This fixes CI failures caused by Bun version mismatches between local development and GitHub Actions. ## Changes - Created `test/.bun-version` to pin Bun to v1.3.2 - Updated all workflows to use `bun-version-file: test/.bun-version` - Migrated workflow cache keys from `bun.lockb` to `bun.lock` - Removed deprecated `test/bun.lockb` binary lockfile ## Why? **Version Consistency:** - Local environments and CI were using different Bun versions - Different versions generate different lockfile formats → CI failures **Lockfile Migration:** - Bun v1.2+ uses text-based `bun.lock` as default - Binary `bun.lockb` is still supported but deprioritized - Text format provides better git diffs and merge conflict resolution ## Affected Workflows - `.github/workflows/task-check-metadata.yml` - `.github/workflows/task-e2e.yml` - `.github/workflows/task-moonwall-tests.yml` - `.github/workflows/task-ts-build.yml` - `.github/workflows/task-ts-lint.yml` ## After Merge Developers should upgrade their local Bun: ```bash bun upgrade --stable # Should install v1.3.2 bun --version # Verify version bun install # Regenerate lockfile if needed ``` --------- Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
This commit is contained in:
parent
0d2333ed02
commit
dd7b72ca29
9 changed files with 19 additions and 8 deletions
2
.github/workflows/task-check-metadata.yml
vendored
2
.github/workflows/task-check-metadata.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: 1.2.16
|
||||
bun-version-file: test/.bun-version
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: test
|
||||
|
|
|
|||
4
.github/workflows/task-e2e.yml
vendored
4
.github/workflows/task-e2e.yml
vendored
|
|
@ -48,6 +48,8 @@ jobs:
|
|||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version-file: test/.bun-version
|
||||
- name: Install Foundry
|
||||
uses: foundry-rs/foundry-toolchain@v1
|
||||
- name: Pull Kurtosis images
|
||||
|
|
@ -98,7 +100,7 @@ jobs:
|
|||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.bun/install/cache
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-bun-
|
||||
- name: Cache Foundry libraries
|
||||
|
|
|
|||
4
.github/workflows/task-moonwall-tests.yml
vendored
4
.github/workflows/task-moonwall-tests.yml
vendored
|
|
@ -42,13 +42,15 @@ jobs:
|
|||
--sealing=manual 2>&1 | head -50 || echo "Node startup test completed"
|
||||
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version-file: test/.bun-version
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.bun/install/cache
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-bun-
|
||||
|
||||
|
|
|
|||
4
.github/workflows/task-ts-build.yml
vendored
4
.github/workflows/task-ts-build.yml
vendored
|
|
@ -15,10 +15,12 @@ jobs:
|
|||
- name: Install Foundry
|
||||
uses: foundry-rs/foundry-toolchain@v1
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version-file: test/.bun-version
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.bun/install/cache
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-bun-
|
||||
- name: Run Forge build
|
||||
|
|
|
|||
8
.github/workflows/task-ts-lint.yml
vendored
8
.github/workflows/task-ts-lint.yml
vendored
|
|
@ -14,10 +14,12 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version-file: test/.bun-version
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.bun/install/cache
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-bun-
|
||||
- name: Install dependencies
|
||||
|
|
@ -34,10 +36,12 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version-file: test/.bun-version
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.bun/install/cache
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
||||
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-bun-
|
||||
- name: Install dependencies
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ Each directory contains its own README with detailed information. See:
|
|||
### Prerequisites
|
||||
|
||||
- [Kurtosis](https://docs.kurtosis.com/install) - Network orchestration
|
||||
- [Bun](https://bun.sh/) v1.2+ - TypeScript runtime
|
||||
- [Bun](https://bun.sh/) v1.3.2+ - TypeScript runtime
|
||||
- [Docker](https://www.docker.com/) - Container management
|
||||
- [Foundry](https://getfoundry.sh/) - Solidity toolkit
|
||||
- [Rust](https://www.rust-lang.org/tools/install) - For building the operator
|
||||
|
|
|
|||
1
test/.bun-version
Normal file
1
test/.bun-version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1.3.2
|
||||
|
|
@ -7,7 +7,7 @@ For comprehensive documentation, see [E2E Testing Guide](./docs/E2E_TESTING_GUID
|
|||
## Pre-requisites
|
||||
|
||||
- [Kurtosis](https://docs.kurtosis.com/install): For launching test networks
|
||||
- [Bun](https://bun.sh/) v1.2 or higher: TypeScript runtime and package manager
|
||||
- [Bun](https://bun.sh/) v1.3.2 or higher: TypeScript runtime and package manager
|
||||
- [Docker](https://www.docker.com/): For container management
|
||||
- [Foundry](https://getfoundry.sh/introduction/installation/): To deploy contracts
|
||||
- [Helm](https://helm.sh/docs/intro/install/): The Kubernetes Package Manager
|
||||
|
|
|
|||
BIN
test/bun.lockb
BIN
test/bun.lockb
Binary file not shown.
Loading…
Reference in a new issue