GeezerVison is showing github.com — refactor(tui): centralize application exit (#31524) · argszero/opencode@3752218
File treeExpand file treeCollapse file tree Open diff view settings server/routes/instance/httpapi
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/test.yml +1-23Lines changed: 1 addition & 23 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 65 | 65 |
| 66 | 66 | - name: Run unit tests | 67 | 67 | timeout-minutes: 20 | 68 | | - run: bun turbo test:ci --log-order=stream --log-prefix=task | | 68 | + run: bun turbo test --output-logs=errors-only --log-order=grouped --log-prefix=task | 69 | 69 | env: | 70 | 70 | OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }} | 71 | 71 |
| | 74 | 74 | working-directory: packages/opencode | 75 | 75 | run: bun run test:httpapi | 76 | 76 |
| 77 | | - - name: Publish unit reports | 78 | | - if: always() | 79 | | - uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0 | 80 | | - with: | 81 | | - report_paths: packages/*/.artifacts/unit/junit.xml | 82 | | - check_name: "unit results (${{ matrix.settings.name }})" | 83 | | - detailed_summary: true | 84 | | - include_time_in_summary: true | 85 | | - fail_on_failure: false | 86 | | - | 87 | | - - name: Upload unit artifacts | 88 | | - if: always() | 89 | | - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | 90 | | - with: | 91 | | - name: unit-${{ matrix.settings.name }}-${{ github.run_attempt }} | 92 | | - include-hidden-files: true | 93 | | - if-no-files-found: ignore | 94 | | - retention-days: 7 | 95 | | - path: packages/*/.artifacts/unit/junit.xml | 96 | | - | 97 | 77 | e2e: | 98 | 78 | name: e2e (${{ matrix.settings.name }}) | 99 | 79 | strategy: | @@ -151,7 +131,6 @@ jobs: | 151 | 131 | run: bun --cwd packages/app test:e2e:local | 152 | 132 | env: | 153 | 133 | CI: true | 154 | | - PLAYWRIGHT_JUNIT_OUTPUT: e2e/junit-${{ matrix.settings.name }}.xml | 155 | 134 | timeout-minutes: 30 | 156 | 135 |
| 157 | 136 | - name: Upload Playwright artifacts | @@ -162,6 +141,5 @@ jobs: | 162 | 141 | if-no-files-found: ignore | 163 | 142 | retention-days: 7 | 164 | 143 | path: | | 165 | | - packages/app/e2e/junit-*.xml | 166 | 144 | packages/app/e2e/test-results | 167 | 145 | packages/app/e2e/playwright-report |
Collapse file Copy file name to clipboardExpand all lines: packages/app/package.json +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 18 | 18 | "build": "vite build", | 19 | 19 | "serve": "vite preview", | 20 | 20 | "test": "bun run test:unit", | 21 | | - "test:ci": "mkdir -p .artifacts/unit && bun test --preload ./happydom.ts ./src --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml", | 22 | | - "test:unit": "bun test --preload ./happydom.ts ./src", | | 21 | + "test:unit": "bun test --only-failures --preload ./happydom.ts ./src", | 23 | 22 | "test:unit:watch": "bun test --watch --preload ./happydom.ts ./src", | 24 | 23 | "test:e2e": "playwright test", | 25 | 24 | "test:e2e:local": "playwright test", | |
Collapse file Copy file name to clipboardExpand all lines: packages/app/playwright.config.ts +1-7Lines changed: 1 addition & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,12 +7,6 @@ const serverPort = process.env.PLAYWRIGHT_SERVER_PORT ?? "4096" | 7 | 7 | const command = `bun run dev -- --host 0.0.0.0 --port ${port}` | 8 | 8 | const reuse = !process.env.CI | 9 | 9 | const workers = Number(process.env.PLAYWRIGHT_WORKERS ?? (process.env.CI ? 5 : 0)) || undefined | 10 | | -const reporter = [["html", { outputFolder: "e2e/playwright-report", open: "never" }], ["line"]] as const | 11 | | - | 12 | | -if (process.env.PLAYWRIGHT_JUNIT_OUTPUT) { | 13 | | - reporter.push(["junit", { outputFile: process.env.PLAYWRIGHT_JUNIT_OUTPUT }]) | 14 | | -} | 15 | | - | 16 | 10 | export default defineConfig({ | 17 | 11 | testDir: "./e2e", | 18 | 12 | outputDir: "./e2e/test-results", | @@ -24,7 +18,7 @@ export default defineConfig({ | 24 | 18 | forbidOnly: !!process.env.CI, | 25 | 19 | retries: process.env.CI ? 2 : 0, | 26 | 20 | workers, | 27 | | - reporter, | | 21 | + reporter: [["html", { outputFolder: "e2e/playwright-report", open: "never" }], ["line"]], | 28 | 22 | webServer: { | 29 | 23 | command, | 30 | 24 | url: baseURL, | |
Collapse file Copy file name to clipboardExpand all lines: packages/core/package.json +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 | "db": "bun drizzle-kit", | 10 | 10 | "migration": "bun run script/migration.ts", | 11 | 11 | "fix-node-pty": "bun run script/fix-node-pty.ts", | 12 | | - "test": "bun test", | 13 | | - "test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml", | | 12 | + "test": "bun test --only-failures", | 14 | 13 | "typecheck": "tsgo --noEmit" | 15 | 14 | }, | 16 | 15 | "bin": { | |
Collapse file Copy file name to clipboardExpand all lines: packages/core/src/flag/flag.ts -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -46,7 +46,6 @@ export const Flag = { | 46 | 46 |
| 47 | 47 | OPENCODE_WORKSPACE_ID: process.env["OPENCODE_WORKSPACE_ID"], | 48 | 48 | OPENCODE_EXPERIMENTAL_WORKSPACES: enabledByExperimental("OPENCODE_EXPERIMENTAL_WORKSPACES"), | 49 | | - OPENCODE_EXPERIMENTAL_SESSION_SWITCHER: enabledByExperimental("OPENCODE_EXPERIMENTAL_SESSION_SWITCHER"), | 50 | 49 |
| 51 | 50 | // Evaluated at access time (not module load) because tests, the CLI, and | 52 | 51 | // external tooling set these env vars at runtime. | |
Collapse file Copy file name to clipboardExpand all lines: packages/effect-drizzle-sqlite/package.json +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 6 | 6 | "license": "MIT", | 7 | 7 | "private": true, | 8 | 8 | "scripts": { | 9 | | - "test": "bun test --timeout 30000", | 10 | | - "test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml", | | 9 | + "test": "bun test --timeout 30000 --only-failures", | 11 | 10 | "typecheck": "tsgo --noEmit" | 12 | 11 | }, | 13 | 12 | "exports": { | |
Collapse file Copy file name to clipboardExpand all lines: packages/http-recorder/package.json +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 27 | 27 | "access": "public" | 28 | 28 | }, | 29 | 29 | "scripts": { | 30 | | - "test": "bun test --timeout 30000", | 31 | | - "test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml", | | 30 | + "test": "bun test --timeout 30000 --only-failures", | 32 | 31 | "typecheck": "tsgo --noEmit", | 33 | 32 | "build": "bun ./script/build.ts", | 34 | 33 | "verify:package": "bun ./script/verify-package.ts" | |
Collapse file Copy file name to clipboardExpand all lines: packages/llm/package.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | "private": true, | 8 | 8 | "scripts": { | 9 | 9 | "setup:recording-env": "bun run script/setup-recording-env.ts", | 10 | | - "test": "bun test --timeout 30000", | | 10 | + "test": "bun test --timeout 30000 --only-failures", | 11 | 11 | "typecheck": "tsgo --noEmit" | 12 | 12 | }, | 13 | 13 | "exports": { | |
Collapse file Copy file name to clipboardExpand all lines: packages/opencode/BUN_SHELL_MIGRATION_PLAN.md -136Lines changed: 0 additions & 136 deletions Collapse file Copy file name to clipboardExpand all lines: packages/opencode/package.json +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | "private": true, | 8 | 8 | "scripts": { | 9 | 9 | "typecheck": "tsgo --noEmit", | 10 | | - "test": "bun test --timeout 30000", | 11 | | - "test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml", | | 10 | + "test": "bun test --timeout 30000 --only-failures", | 12 | 11 | "test:httpapi": "bun run script/httpapi-exercise.ts --mode coverage --fail-on-missing --fail-on-skip && bun run script/httpapi-exercise.ts --mode auth --fail-on-missing --fail-on-skip && bun run script/httpapi-exercise.ts --mode effect --fail-on-missing --fail-on-skip", | 13 | 12 | "bench:test": "bun run script/bench-test-suite.ts", | 14 | 13 | "profile:test": "bun run script/profile-test-files.ts", | |
|