Skip to content

Commit bff0118

Browse files
committed
skip ssh tests for forks
1 parent b76a503 commit bff0118

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/pr_checks.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ jobs:
444444
chmod 600 ~/.ssh/id_rsa
445445
ssh-keyscan -H "$SSH_HOST" >> ~/.ssh/known_hosts
446446
echo -e "Host ssh-test-container\n\tHostName $SSH_HOST\n\tUser ec2-user\n\tIdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
447+
if: ${{ github.event.pull_request.head.repo.fork == false }}
447448

448449
- name: Set up Xvfb
449450
run: |
@@ -453,7 +454,7 @@ jobs:
453454
- name: Run e2e tests
454455
run: |
455456
cd extensions/vscode
456-
TEST_FILE="${{ matrix.test_file }}" npm run ${{ matrix.command }}
457+
IGNORE_SSH_TESTS="${{ github.event.pull_request.head.repo.fork }}" TEST_FILE="${{ matrix.test_file }}" npm run ${{ matrix.command }}
457458
env:
458459
DISPLAY: :99
459460

extensions/vscode/e2e/tests/SSH.test.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
import {
22
EditorView,
3-
TextEditor,
43
InputBox,
5-
Workbench,
64
Key,
7-
VSBrowser,
5+
TextEditor,
6+
Workbench,
87
} from "vscode-extension-tester";
98

9+
import { AutocompleteActions } from "../actions/Autocomplete.actions";
1010
import { DEFAULT_TIMEOUT } from "../constants";
11-
import { TestUtils } from "../TestUtils";
1211
import { SSHSelectors } from "../selectors/SSH.selectors";
13-
import { AutocompleteActions } from "../actions/Autocomplete.actions";
12+
import { TestUtils } from "../TestUtils";
1413

1514
describe("SSH", function () {
15+
if (process.env.IGNORE_SSH_TESTS === "true") {
16+
it("Skipping SSH tests", () => {
17+
console.log("Skipping SSH tests due to IGNORE_SSH_TESTS being set");
18+
});
19+
return;
20+
}
21+
1622
it("Should display completions", async () => {
1723
await TestUtils.waitForSuccess(async () => {
1824
await new Workbench().executeCommand(

0 commit comments

Comments
 (0)