run e2e tests a second time with config.yaml
This commit is contained in:
parent
82bbbc5918
commit
69185b3082
5 changed files with 132 additions and 3 deletions
78
.github/workflows/pr_checks.yaml
vendored
78
.github/workflows/pr_checks.yaml
vendored
|
|
@ -449,6 +449,84 @@ jobs:
|
|||
name: e2e-failure-screenshots
|
||||
path: extensions/vscode/e2e/storage/screenshots
|
||||
|
||||
# We run all of the e2e tests a second time with config.yaml instead of config.json
|
||||
# The only change is the environment variable specifying to use the test-continue-yaml
|
||||
# folder rather than test-continue, which contains a config.yaml instead of config.json
|
||||
vscode-e2e-tests-yaml:
|
||||
name: ${{ matrix.test_file }}"
|
||||
needs:
|
||||
[
|
||||
vscode-download-e2e-dependencies,
|
||||
vscode-get-test-file-matrix,
|
||||
vscode-package-extension,
|
||||
install-vscode,
|
||||
install-core,
|
||||
]
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test_file: ${{ fromJson(needs.vscode-get-test-file-matrix.outputs.test_file_matrix) }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: vscode-node-modules-cache
|
||||
with:
|
||||
path: extensions/vscode/node_modules
|
||||
key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }}
|
||||
|
||||
- name: Download build artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: vscode-extension-build
|
||||
path: extensions/vscode/build
|
||||
|
||||
- name: Download e2e dependencies
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: vscode-e2e-dependencies
|
||||
path: extensions/vscode/e2e/storage
|
||||
|
||||
- name: Fix VSCode binary permissions
|
||||
run: |
|
||||
chmod +x extensions/vscode/e2e/storage/VSCode-linux-x64/code
|
||||
chmod +x extensions/vscode/e2e/storage/chromedriver-linux64/chromedriver
|
||||
|
||||
- name: Set up SSH
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.GH_ACTIONS_SSH_TEST_KEY_PEM }}
|
||||
SSH_HOST: ${{ secrets.GH_ACTIONS_SSH_TEST_DNS_NAME }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_KEY" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan -H "$SSH_HOST" >> ~/.ssh/known_hosts
|
||||
echo -e "Host ssh-test-container\n\tHostName $SSH_HOST\n\tUser ec2-user\n\tIdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
|
||||
|
||||
- name: Set up Xvfb
|
||||
run: |
|
||||
Xvfb :99 &
|
||||
export DISPLAY=:99
|
||||
|
||||
- name: Run e2e tests
|
||||
run: |
|
||||
cd extensions/vscode
|
||||
TEST_FILE="${{ matrix.test_file }}" npm run e2e:ci:run-yaml
|
||||
|
||||
env:
|
||||
DISPLAY: :99
|
||||
|
||||
- name: Upload e2e test screenshots
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: e2e-failure-screenshots
|
||||
path: extensions/vscode/e2e/storage/screenshots
|
||||
|
||||
gui-tests:
|
||||
needs: [install-gui, install-core]
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
4
extensions/vscode/.gitignore
vendored
4
extensions/vscode/.gitignore
vendored
|
|
@ -23,4 +23,6 @@ e2e/.test-extensions
|
|||
e2e/storage
|
||||
e2e/vsix
|
||||
e2e/test-continue/*
|
||||
!e2e/test-continue/config.json
|
||||
!e2e/test-continue/config.json
|
||||
e2e/test-continue-yaml/*
|
||||
!e2e/test-continue-yaml/config.yaml
|
||||
48
extensions/vscode/e2e/test-continue-yaml/config.yaml
Normal file
48
extensions/vscode/e2e/test-continue-yaml/config.yaml
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Test Config
|
||||
version: 0.0.1
|
||||
|
||||
models:
|
||||
- name: TEST LLM
|
||||
provider: test
|
||||
model: this field is not used
|
||||
roles:
|
||||
- chat
|
||||
- edit
|
||||
- apply
|
||||
- autocomplete
|
||||
|
||||
- name: Mock
|
||||
provider: mock
|
||||
model: this field is not used
|
||||
roles:
|
||||
- chat
|
||||
- edit
|
||||
- apply
|
||||
|
||||
- name: TOOL MOCK LLM
|
||||
provider: mock
|
||||
model: claude-3-5-sonnet-latest
|
||||
requestOptions:
|
||||
extraBodyProperties:
|
||||
chatStream:
|
||||
- - role: assistant
|
||||
content: "I'm going to call a tool:"
|
||||
- role: assistant
|
||||
content: ""
|
||||
toolCalls:
|
||||
- id: test_id
|
||||
type: function
|
||||
function:
|
||||
name: builtin_exact_search
|
||||
arguments: '{"query": "test query"}'
|
||||
- REPEAT_LAST_MSG
|
||||
roles:
|
||||
- chat
|
||||
- edit
|
||||
- apply
|
||||
|
||||
context:
|
||||
- uses: docs
|
||||
- uses: diff
|
||||
- uses: url
|
||||
- uses: folder
|
||||
2
extensions/vscode/package-lock.json
generated
2
extensions/vscode/package-lock.json
generated
|
|
@ -106,7 +106,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.10",
|
||||
"@continuedev/config-yaml": "^1.0.11",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
|
|||
|
|
@ -628,7 +628,8 @@
|
|||
"e2e:all": "npm run e2e:build && npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:sign-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:install-extensions && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test && npm run e2e:clean",
|
||||
"e2e:quick": "npm run e2e:compile && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test && npm run e2e:clean",
|
||||
"e2e:ci:download": "npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode",
|
||||
"e2e:ci:run": "npm run e2e:compile && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:install-extensions && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test"
|
||||
"e2e:ci:run": "npm run e2e:compile && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:install-extensions && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test",
|
||||
"e2e:ci:run-yaml": "npm run e2e:compile && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:install-extensions && CONTINUE_GLOBAL_DIR=e2e/test-continue-yaml npm run e2e:test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.6.4",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue