|
13 | 13 | options: --ulimit core=-1 --ulimit memlock=-1:-1 |
14 | 14 | steps: |
15 | 15 | - uses: actions/checkout@v4 |
| 16 | + - name: Install Bun |
| 17 | + run: | |
| 18 | + set -e # Exit on error |
| 19 | + # GitHub Actions containers set HOME=/github/home |
| 20 | + export BUN_INSTALL="/github/home/.bun" |
| 21 | + echo "Installing Bun to $BUN_INSTALL..." |
| 22 | + curl -fsSL https://bun.sh/install | bash |
| 23 | + echo "Checking if Bun was installed..." |
| 24 | + ls -la /github/home/.bun/bin/ || echo "Bun directory not found at /github/home/.bun/bin/" |
| 25 | + # Try alternative location if primary fails |
| 26 | + if [ ! -f "/github/home/.bun/bin/bun" ]; then |
| 27 | + echo "Bun not at /github/home/.bun/bin/bun, checking $HOME/.bun/bin/bun..." |
| 28 | + ls -la $HOME/.bun/bin/ || echo "Bun not at $HOME/.bun/bin/ either" |
| 29 | + if [ -f "$HOME/.bun/bin/bun" ]; then |
| 30 | + cp $HOME/.bun/bin/bun /usr/local/bin/bun |
| 31 | + else |
| 32 | + echo "ERROR: Could not find Bun binary after installation" |
| 33 | + exit 1 |
| 34 | + fi |
| 35 | + else |
| 36 | + cp /github/home/.bun/bin/bun /usr/local/bin/bun |
| 37 | + fi |
| 38 | + chmod +x /usr/local/bin/bun |
| 39 | + /usr/local/bin/bun --version |
16 | 40 | - name: Install packages |
17 | 41 | run: npm install |
| 42 | + - name: Verify Bun is available |
| 43 | + run: | |
| 44 | + echo "Checking Bun availability..." |
| 45 | + ls -la /usr/local/bin/bun || echo "/usr/local/bin/bun not found" |
| 46 | + which bun || echo "bun not in PATH" |
| 47 | + /usr/local/bin/bun --version || echo "Cannot run /usr/local/bin/bun" |
| 48 | + bun --version || echo "Cannot run bun directly" |
18 | 49 | - name: Test |
19 | 50 | run: npm test |
20 | 51 | - name: Set version to match tag |
|
0 commit comments