Skip to content

Commit de39340

Browse files
committed
🤖 ci: split Ollama tests into separate job
Separates Ollama integration tests from main integration test suite: **New Job: ollama-test** - Dedicated job for Ollama-specific tests - Sets up Ollama binary and model cache - Runs only tests/ipcMain/ollama.test.ts - Uploads coverage with 'ollama-tests' flag **Updated Job: integration-test** - Removed Ollama setup steps - Excludes ollama.test.ts via --testPathIgnorePatterns - Removed OLLAMA_BASE_URL env var - Faster execution without Ollama dependencies Benefits: - Better parallelism (Ollama tests run independently) - Clearer separation of concerns - Main integration tests complete faster - Ollama-specific caching isolated to one job _Generated with `cmux`_
1 parent c115295 commit de39340

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,36 @@ jobs:
9999

100100
- uses: ./.github/actions/setup-cmux
101101

102+
- name: Build worker files
103+
run: make build-main
104+
105+
- name: Run integration tests with coverage
106+
# --silent suppresses per-test output (17 test files × 32 workers = overwhelming logs)
107+
# Exclude Ollama tests (run separately in ollama-test job)
108+
run: TEST_INTEGRATION=1 bun x jest --coverage --maxWorkers=100% --silent --testPathIgnorePatterns=ollama.test.ts ${{ github.event.inputs.test_filter || 'tests' }}
109+
env:
110+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
111+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
112+
113+
- name: Upload coverage to Codecov
114+
uses: codecov/codecov-action@v5
115+
with:
116+
token: ${{ secrets.CODECOV_TOKEN }}
117+
files: ./coverage/lcov.info
118+
flags: integration-tests
119+
fail_ci_if_error: false
120+
121+
ollama-test:
122+
name: Ollama Integration Tests
123+
runs-on: ${{ github.repository_owner == 'coder' && 'depot-ubuntu-24.04-32' || 'ubuntu-latest' }}
124+
steps:
125+
- name: Checkout code
126+
uses: actions/checkout@v4
127+
with:
128+
fetch-depth: 0 # Required for git describe to find tags
129+
130+
- uses: ./.github/actions/setup-cmux
131+
102132
- name: Setup Ollama
103133
uses: ./.github/actions/setup-ollama
104134

@@ -113,20 +143,18 @@ jobs:
113143
- name: Build worker files
114144
run: make build-main
115145

116-
- name: Run integration tests with coverage
117-
# --silent suppresses per-test output (17 test files × 32 workers = overwhelming logs)
118-
run: TEST_INTEGRATION=1 bun x jest --coverage --maxWorkers=100% --silent ${{ github.event.inputs.test_filter || 'tests' }}
146+
- name: Run Ollama integration tests with coverage
147+
# Run only Ollama-specific tests
148+
run: TEST_INTEGRATION=1 bun x jest --coverage --maxWorkers=100% tests/ipcMain/ollama.test.ts
119149
env:
120-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
121-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
122150
OLLAMA_BASE_URL: http://localhost:11434/api
123151

124152
- name: Upload coverage to Codecov
125153
uses: codecov/codecov-action@v5
126154
with:
127155
token: ${{ secrets.CODECOV_TOKEN }}
128156
files: ./coverage/lcov.info
129-
flags: integration-tests
157+
flags: ollama-tests
130158
fail_ci_if_error: false
131159

132160
storybook-test:

0 commit comments

Comments
 (0)