Skip to content
Merged
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
16 changes: 12 additions & 4 deletions .github/actions/setup-cmux/action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
name: 'Setup cmux build environment'
description: 'Setup Bun and install dependencies'
name: 'Setup Cmux'
description: 'Setup Bun and install dependencies with caching'
runs:
using: "composite"
using: 'composite'
steps:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Cache bun dependencies
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
run: bun install --frozen-lockfile
shell: bash
run: bun install --frozen-lockfile
50 changes: 20 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,29 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile
- uses: ./.github/actions/setup-cmux

- name: Generate version file
run: ./scripts/generate-version.sh

- name: Install shfmt
- name: Cache shfmt
id: cache-shfmt
uses: actions/cache@v4
with:
path: ~/.local/bin/shfmt
# We install latest via webinstall; reflect that in the cache key to avoid pinning mismatches
key: ${{ runner.os }}-shfmt-latest
restore-keys: |
${{ runner.os }}-shfmt-

- name: Install and setup shfmt
run: |
curl -sS https://webinstall.dev/shfmt | bash
if [[ ! -f "$HOME/.local/bin/shfmt" ]]; then
curl -sS https://webinstall.dev/shfmt | bash
fi
echo "$HOME/.local/bin" >> $GITHUB_PATH
# Verify shfmt is available
"$HOME/.local/bin/shfmt" --version

- name: Install Nix
uses: cachix/install-nix-action@v27
Expand All @@ -45,13 +53,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile
- uses: ./.github/actions/setup-cmux

- name: Run tests
run: make test-unit
Expand All @@ -63,13 +65,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile
- uses: ./.github/actions/setup-cmux

- name: Run integration tests
run: make test-integration
Expand All @@ -84,13 +80,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install --frozen-lockfile
- uses: ./.github/actions/setup-cmux

- name: Install system dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ build/icon.icns: docs/img/logo.webp
## Quality checks (can run in parallel)
static-check: lint typecheck fmt-check ## Run all static checks

lint: node_modules/.installed ## Run linter and typecheck
lint: node_modules/.installed ## Run ESLint (typecheck runs in separate target)
@./scripts/lint.sh

lint-fix: node_modules/.installed ## Run linter with --fix
Expand Down
3 changes: 1 addition & 2 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@ if [ "$1" = "--fix" ]; then
else
echo "Running eslint..."
bun x eslint "$ESLINT_PATTERN"
./scripts/typecheck.sh
echo "All lint checks passed!"
echo "ESLint checks passed!"
fi