From a3fd5ad91844627f5f167c0c5e436a66bcca71dc Mon Sep 17 00:00:00 2001 From: Daphne Yang Date: Fri, 9 Feb 2024 09:57:20 -0500 Subject: [PATCH] chore: add a base suite for running tests on minimum VSCode version + rename Templates to Create Commands --- .github/workflows/baseSuiteE2E.yml | 164 +++++++++++++++++++++++++++++ .github/workflows/coreE2E.yml | 4 +- .github/workflows/e2e.yml | 65 ++++++------ 3 files changed, 199 insertions(+), 34 deletions(-) create mode 100644 .github/workflows/baseSuiteE2E.yml diff --git a/.github/workflows/baseSuiteE2E.yml b/.github/workflows/baseSuiteE2E.yml new file mode 100644 index 00000000..4a8c347d --- /dev/null +++ b/.github/workflows/baseSuiteE2E.yml @@ -0,0 +1,164 @@ +name: Base E2E Test Suite for Minimum VSCode Version + +on: + workflow_run: + workflows: + - Nightly Build Develop + - Test, Build, and Release + types: + - completed + + workflow_dispatch: + inputs: + automationBranch: + description: "Set the branch to use for automation tests" + required: false + default: "develop" + type: string + anInitialSuite: + description: "Verify Extensions" + required: false + default: true + type: boolean + authentication: + description: "Authentication" + required: false + default: true + type: boolean + templates: + description: "Create Commands" + required: false + default: true + type: boolean + deployAndRetrieve: + description: "Deploy and Retrieve" + required: false + default: true + type: boolean + apexLsp: + description: "Apex LSP" + required: false + default: true + type: boolean + runApexTests: + description: "Run Apex Tests" + required: false + default: true + type: boolean + vscodeVersion: + description: "VSCode Version" + required: false + default: "1.82.3" + type: string + runId: + description: "Run ID of the workflow run that created the vsixes" + required: true + type: string + + workflow_call: + inputs: + automationBranch: + description: "Set the branch to use for automation tests" + required: false + default: "develop" + type: string + anInitialSuite: + description: "Verify Extensions" + required: false + default: true + type: boolean + authentication: + description: "Authentication" + required: false + default: true + type: boolean + templates: + description: "Create Commands" + required: false + default: true + type: boolean + deployAndRetrieve: + description: "Deploy and Retrieve" + required: false + default: true + type: boolean + apexLsp: + description: "Apex LSP" + required: false + default: true + type: boolean + runApexTests: + description: "Run Apex Tests" + required: false + default: true + type: boolean + vscodeVersion: + description: "VSCode Version" + required: false + default: "1.82.3" + type: string + runId: + description: "Run ID of the workflow run that created the vsixes" + required: true + type: string + +jobs: + anInitialSuite: + if: ${{ inputs.anInitialSuite || github.event_name == 'workflow_run' }} + uses: ./.github/workflows/runE2ETest.yml + secrets: inherit + with: + automationBranch: ${{ inputs.automationBranch || github.event_name == 'workflow_run' }} + testToRun: "anInitialSuite.e2e.ts" + vscodeVersion: ${{ inputs.vscodeVersion || '1.82.3' }} + runId: ${{ inputs.runId }} + + authentication: + if: ${{ inputs.authentication || github.event_name == 'workflow_run' }} + uses: ./.github/workflows/runE2ETest.yml + secrets: inherit + with: + automationBranch: ${{ inputs.automationBranch }} + testToRun: "authentication.e2e.ts" + vscodeVersion: ${{ inputs.vscodeVersion || '1.82.3' }} + runId: ${{ inputs.runId }} + + templates: + if: ${{ inputs.templates || github.event_name == 'workflow_run' }} + uses: ./.github/workflows/runE2ETest.yml + secrets: inherit + with: + automationBranch: ${{ inputs.automationBranch }} + testToRun: "templates.e2e.ts" + vscodeVersion: ${{ inputs.vscodeVersion || '1.82.3' }} + runId: ${{ inputs.runId }} + + deployAndRetrieve: + if: ${{ inputs.deployAndRetrieve || github.event_name == 'workflow_run' }} + uses: ./.github/workflows/runE2ETest.yml + secrets: inherit + with: + automationBranch: ${{ inputs.automationBranch }} + testToRun: "deployAndRetrieve.e2e.ts" + vscodeVersion: ${{ inputs.vscodeVersion || '1.82.3' }} + runId: ${{ inputs.runId }} + + apexLSP: + if: ${{ inputs.apexLsp || github.event_name == 'workflow_run' }} + uses: ./.github/workflows/runE2ETest.yml + secrets: inherit + with: + automationBranch: ${{ inputs.automationBranch }} + testToRun: "apexLsp.e2e.ts" + vscodeVersion: ${{ inputs.vscodeVersion || '1.82.3' }} + runId: ${{ inputs.runId }} + + runApexTests: + if: ${{ inputs.runApexTests || github.event_name == 'workflow_run' }} + uses: ./.github/workflows/runE2ETest.yml + secrets: inherit + with: + automationBranch: ${{ inputs.automationBranch }} + testToRun: "runApexTests.e2e.ts" + vscodeVersion: ${{ inputs.vscodeVersion || '1.82.3' }} + runId: ${{ inputs.runId }} diff --git a/.github/workflows/coreE2E.yml b/.github/workflows/coreE2E.yml index 8f413906..be4f17be 100644 --- a/.github/workflows/coreE2E.yml +++ b/.github/workflows/coreE2E.yml @@ -29,7 +29,7 @@ on: default: true type: boolean templates: - description: "Templates" + description: "Create Commands" required: false default: true type: boolean @@ -71,7 +71,7 @@ on: default: true type: boolean templates: - description: "Templates" + description: "Create Commands" required: false default: true type: boolean diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index de76a3f5..9211b543 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -6,6 +6,7 @@ on: - Test, Build, and Release types: - completed + workflow_dispatch: inputs: automationBranch: @@ -80,38 +81,38 @@ jobs: vscodeVersion: ${{ inputs.vscodeVersion || '1.85.2' }} runId: ${{ inputs.runId || github.event.workflow_run.id }} - Apex_E2E_tests_min_vscode_version: - if: ${{ github.event_name == 'workflow_run' }} - uses: ./.github/workflows/apexE2E.yml - secrets: inherit - with: - automationBranch: ${{ inputs.automationBranch || 'develop' }} - vscodeVersion: ${{ '1.82.3' }} - runId: ${{ inputs.runId || github.event.workflow_run.id }} + # Apex_E2E_tests_min_vscode_version: + # if: ${{ github.event_name == 'workflow_run' }} + # uses: ./.github/workflows/apexE2E.yml + # secrets: inherit + # with: + # automationBranch: ${{ inputs.automationBranch || 'develop' }} + # vscodeVersion: ${{ '1.82.3' }} + # runId: ${{ inputs.runId || github.event.workflow_run.id }} - Core_E2E_tests_min_vscode_version: - if: ${{ github.event_name == 'workflow_run' }} - uses: ./.github/workflows/coreE2E.yml - secrets: inherit - with: - automationBranch: ${{ inputs.automationBranch || 'develop' }} - vscodeVersion: ${{ '1.82.3' }} - runId: ${{ inputs.runId || github.event.workflow_run.id }} + # Core_E2E_tests_min_vscode_version: + # if: ${{ github.event_name == 'workflow_run' }} + # uses: ./.github/workflows/coreE2E.yml + # secrets: inherit + # with: + # automationBranch: ${{ inputs.automationBranch || 'develop' }} + # vscodeVersion: ${{ '1.82.3' }} + # runId: ${{ inputs.runId || github.event.workflow_run.id }} - DeployAndRetrieve_E2E_tests_min_vscode_version: - if: ${{ github.event_name == 'workflow_run' }} - uses: ./.github/workflows/deployRetrieveE2E.yml - secrets: inherit - with: - automationBranch: ${{ inputs.automationBranch || 'develop' }} - vscodeVersion: ${{ '1.82.3' }} - runId: ${{ inputs.runId || github.event.workflow_run.id }} + # DeployAndRetrieve_E2E_tests_min_vscode_version: + # if: ${{ github.event_name == 'workflow_run' }} + # uses: ./.github/workflows/deployRetrieveE2E.yml + # secrets: inherit + # with: + # automationBranch: ${{ inputs.automationBranch || 'develop' }} + # vscodeVersion: ${{ '1.82.3' }} + # runId: ${{ inputs.runId || github.event.workflow_run.id }} - LSP_E2E_tests_min_vscode_version: - if: ${{ github.event_name == 'workflow_run' }} - uses: ./.github/workflows/lspE2E.yml - secrets: inherit - with: - automationBranch: ${{ inputs.automationBranch || 'develop' }} - vscodeVersion: ${{ '1.82.3' }} - runId: ${{ inputs.runId || github.event.workflow_run.id }} + # LSP_E2E_tests_min_vscode_version: + # if: ${{ github.event_name == 'workflow_run' }} + # uses: ./.github/workflows/lspE2E.yml + # secrets: inherit + # with: + # automationBranch: ${{ inputs.automationBranch || 'develop' }} + # vscodeVersion: ${{ '1.82.3' }} + # runId: ${{ inputs.runId || github.event.workflow_run.id }}