Merge pull request #3368 from continuedev/tomasz/ci-caching
ci: cache vscode and chromedriver
This commit is contained in:
commit
abf27d528f
3 changed files with 26 additions and 17 deletions
21
.github/workflows/pr_checks.yaml
vendored
21
.github/workflows/pr_checks.yaml
vendored
|
|
@ -202,14 +202,31 @@ jobs:
|
|||
- 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') }}
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: core-node-modules-cache
|
||||
with:
|
||||
path: core/node_modules
|
||||
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: storage-cache
|
||||
with:
|
||||
path: extensions/vscode/e2e/storage
|
||||
key: ${{ runner.os }}-vscode-storage-${{ hashFiles('extensions/vscode/package-lock.json') }}
|
||||
|
||||
- name: Download Dependencies if Cache Miss
|
||||
if: steps.storage-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd extensions/vscode
|
||||
npm run e2e:ci:download
|
||||
|
||||
- name: Set up SSH
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.GH_ACTIONS_SSH_TEST_KEY_PEM }}
|
||||
|
|
@ -220,6 +237,7 @@ jobs:
|
|||
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: Install Xvfb for Linux and run e2e tests
|
||||
run: |
|
||||
sudo apt-get install -y xvfb # Install Xvfb
|
||||
|
|
@ -227,7 +245,8 @@ jobs:
|
|||
export DISPLAY=:99 # Export the display number to the environment
|
||||
cd extensions/vscode
|
||||
npm run package
|
||||
npm run e2e:ci
|
||||
npm run e2e:ci:run
|
||||
|
||||
- name: Upload e2e test screenshots
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
|
|||
|
|
@ -13,11 +13,7 @@ import { SSHSelectors } from "../selectors/SSH.selectors";
|
|||
import { AutocompleteActions } from "../actions/Autocomplete.actions";
|
||||
|
||||
describe("SSH", function () {
|
||||
this.retries(2);
|
||||
|
||||
beforeEach(async function () {
|
||||
this.timeout(DEFAULT_TIMEOUT.XL);
|
||||
|
||||
it("Should display completions", async () => {
|
||||
await TestUtils.waitForSuccess(async () => {
|
||||
await new Workbench().executeCommand(
|
||||
"Remote-SSH: Connect Current Window to Host...",
|
||||
|
|
@ -32,13 +28,6 @@ describe("SSH", function () {
|
|||
DEFAULT_TIMEOUT.XL,
|
||||
);
|
||||
|
||||
// await TestUtils.waitForSuccess(async () => {
|
||||
// await new Workbench().executeCommand("File: Open Folder...");
|
||||
// const inputBox = await InputBox.create(DEFAULT_TIMEOUT.MD);
|
||||
// await inputBox.setText("/home/ec2-user/test-folder");
|
||||
// await inputBox.sendKeys(Key.ENTER);
|
||||
// });
|
||||
|
||||
await TestUtils.waitForSuccess(async () => {
|
||||
await new Workbench().executeCommand("File: Open File...");
|
||||
const inputBox = await InputBox.create(DEFAULT_TIMEOUT.MD);
|
||||
|
|
@ -46,9 +35,7 @@ describe("SSH", function () {
|
|||
await inputBox.selectQuickPick("main.py");
|
||||
await inputBox.sendKeys(Key.ENTER);
|
||||
}, DEFAULT_TIMEOUT.XL);
|
||||
});
|
||||
|
||||
it("Should display completions", async () => {
|
||||
const editor = await TestUtils.waitForSuccess(
|
||||
async () => (await new EditorView().openEditor("main.py")) as TextEditor,
|
||||
);
|
||||
|
|
@ -57,5 +44,7 @@ describe("SSH", function () {
|
|||
await editor.clearText();
|
||||
await AutocompleteActions.testCompletions(editor);
|
||||
await editor.setText(text);
|
||||
}).timeout(DEFAULT_TIMEOUT.XL);
|
||||
})
|
||||
.timeout(DEFAULT_TIMEOUT.XL)
|
||||
.retries(2);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -633,7 +633,8 @@
|
|||
"e2e:clean": "rm -rf ./e2e/_output",
|
||||
"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": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-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"
|
||||
"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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.6.4",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue