Skip to content

Commit 85d1d4a

Browse files
committed
Run integration tests in CI
1 parent e8f0b35 commit 85d1d4a

13 files changed

+491
-348
lines changed

.env.integration.example

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
OPEN_ROUTER_API_KEY=sk-or-v1-...

.github/workflows/code-qa.yml

+27-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Code QA Roo Code
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches: [main]
67
pull_request:
@@ -13,33 +14,51 @@ jobs:
1314
steps:
1415
- name: Checkout code
1516
uses: actions/checkout@v4
16-
1717
- name: Setup Node.js
1818
uses: actions/setup-node@v4
1919
with:
2020
node-version: '18'
2121
cache: 'npm'
22-
2322
- name: Install dependencies
2423
run: npm run install:all
25-
26-
- name: Compile TypeScript
24+
- name: Compile
2725
run: npm run compile
26+
- name: Check types
27+
run: npm run check-types
28+
- name: Lint
29+
run: npm run lint
2830

2931
unit-test:
3032
runs-on: ubuntu-latest
3133
steps:
3234
- name: Checkout code
3335
uses: actions/checkout@v4
34-
3536
- name: Setup Node.js
3637
uses: actions/setup-node@v4
3738
with:
3839
node-version: '18'
3940
cache: 'npm'
40-
4141
- name: Install dependencies
4242
run: npm run install:all
43-
4443
- name: Run unit tests
45-
run: npm test
44+
run: npm test
45+
46+
integration-test:
47+
strategy:
48+
matrix:
49+
os: [macos-latest] # ubuntu-latest, windows-latest
50+
runs-on: ${{ matrix.os }}
51+
steps:
52+
- name: Checkout code
53+
uses: actions/checkout@v4
54+
- name: Setup Node.js
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: '18'
58+
cache: 'npm'
59+
- name: Install dependencies
60+
run: npm run install:all
61+
- run: xvfb-run -a npm test:integration
62+
if: runner.os == 'Linux'
63+
- run: npm test:integration
64+
if: runner.os != 'Linux'

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
out
21
dist
2+
out
3+
out-integration
34
node_modules
45
coverage/
56

@@ -18,3 +19,6 @@ roo-cline-*.vsix
1819

1920
# Docs
2021
docs/_site/
22+
23+
# Dotenv
24+
.env.integration

.vscode-test.mjs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
/**
2+
* See: https://code.visualstudio.com/api/working-with-extensions/testing-extension
3+
*/
4+
15
import { defineConfig } from '@vscode/test-cli';
26

37
export default defineConfig({
4-
files: 'src/test/extension.test.ts',
8+
label: 'integrationTest',
9+
files: 'out-integration/test/**/*.test.js',
510
workspaceFolder: '.',
611
mocha: {
12+
ui: 'tdd',
713
timeout: 60000,
8-
ui: 'tdd'
914
},
1015
launchArgs: [
1116
'--enable-proposed-api=RooVeterinaryInc.roo-cline',

flake.lock

+27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
description = "Roo Code development environment";
3+
4+
inputs = {
5+
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
6+
};
7+
8+
outputs = { self, nixpkgs, ... }: let
9+
systems = [ "aarch64-darwin" "x86_64-linux" ];
10+
11+
forAllSystems = nixpkgs.lib.genAttrs systems;
12+
13+
mkDevShell = system: let
14+
pkgs = import nixpkgs { inherit system; };
15+
in pkgs.mkShell {
16+
name = "roo-code";
17+
18+
packages = with pkgs; [
19+
zsh
20+
nodejs_18
21+
corepack_18
22+
];
23+
24+
shellHook = ''
25+
exec zsh
26+
'';
27+
};
28+
in {
29+
devShells = forAllSystems (system: {
30+
default = mkDevShell system;
31+
});
32+
};
33+
}

package-lock.json

+175-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)