From 892eca2d641f26597161bc039f47a1abe6a819bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristina=20Ca=C3=B1izales?= <113132642+CristiCanizales@users.noreply.github.com> Date: Fri, 18 Oct 2024 18:14:33 -0300 Subject: [PATCH] chore: apex LSP running on redhat (#5906) * chore: apexlsp redhat * chore: apexlsp redhat * chore: new e2e main workflow --- .github/workflows/apexE2EredHat.yml | 186 ++++++++++++++++++++++++++++ .github/workflows/e2e.yml | 18 --- .github/workflows/e2eRedHat.yml | 73 +++++++++++ 3 files changed, 259 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/apexE2EredHat.yml create mode 100644 .github/workflows/e2eRedHat.yml diff --git a/.github/workflows/apexE2EredHat.yml b/.github/workflows/apexE2EredHat.yml new file mode 100644 index 0000000000..85f6d7aa2e --- /dev/null +++ b/.github/workflows/apexE2EredHat.yml @@ -0,0 +1,186 @@ +name: Apex End to End Tests - Redhat + +on: + workflow_dispatch: + inputs: + automationBranch: + description: 'Set the branch to use for automation tests' + required: false + default: 'main' + type: string + apexLsp: + description: 'Apex LSP' + required: false + default: true + type: boolean + # apexReplayDebugger: + # description: 'Apex Replay Debugger' + # required: false + # default: true + # type: boolean + # debugApexTests: + # description: 'Debug Apex Tests' + # required: false + # default: true + # type: boolean + # runApexTests: + # description: 'Run Apex Tests' + # required: false + # default: true + # type: boolean + # trailApexReplayDebugger: + # description: 'Trail Apex Replay Debugger' + # required: false + # default: true + # type: boolean + vscodeVersion: + description: 'VSCode Version' + required: false + default: 'stable' + 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: 'main' + type: string + apexLsp: + description: 'Apex LSP' + required: false + default: true + type: boolean + # apexReplayDebugger: + # description: 'Apex Replay Debugger' + # required: false + # default: true + # type: boolean + # debugApexTests: + # description: 'Debug Apex Tests' + # required: false + # default: true + # type: boolean + # runApexTests: + # description: 'Run Apex Tests' + # required: false + # default: true + # type: boolean + # trailApexReplayDebugger: + # description: 'Trail Apex Replay Debugger' + # required: false + # default: true + # type: boolean + vscodeVersion: + description: 'VSCode Version' + required: false + default: 'stable' + type: string + runId: + description: 'Run ID of the workflow run that created the vsixes' + required: true + type: string + +jobs: + apexLSP: + if: ${{ inputs.apexLsp }} + uses: ./.github/workflows/runE2ETest.yml + secrets: inherit + with: + automationBranch: ${{ inputs.automationBranch }} + automationRepo: 'salesforcedx-vscode-automation-tests-redhat' + testToRun: 'apexLsp.e2e.js' + vscodeVersion: ${{ inputs.vscodeVersion }} + runId: ${{ inputs.runId }} + + # apexReplayDebugger: + # if: ${{ inputs.apexReplayDebugger }} + # uses: ./.github/workflows/runE2ETest.yml + # secrets: inherit + # with: + # automationBranch: ${{ inputs.automationBranch }} + # testToRun: 'apexReplayDebugger.e2e.ts' + # vscodeVersion: ${{ inputs.vscodeVersion }} + # runId: ${{ inputs.runId }} + + # debugApexTests: + # if: ${{ inputs.debugApexTests }} + # uses: ./.github/workflows/runE2ETest.yml + # secrets: inherit + # with: + # automationBranch: ${{ inputs.automationBranch }} + # testToRun: 'debugApexTests.e2e.ts' + # vscodeVersion: ${{ inputs.vscodeVersion }} + # runId: ${{ inputs.runId }} + + # runApexTests: + # if: ${{ inputs.runApexTests }} + # uses: ./.github/workflows/runE2ETest.yml + # secrets: inherit + # with: + # automationBranch: ${{ inputs.automationBranch }} + # testToRun: 'runApexTests.e2e.ts' + # vscodeVersion: ${{ inputs.vscodeVersion }} + # runId: ${{ inputs.runId }} + + # trailApexReplayDebugger: + # if: ${{ inputs.trailApexReplayDebugger }} + # uses: ./.github/workflows/runE2ETest.yml + # secrets: inherit + # with: + # automationBranch: ${{ inputs.automationBranch }} + # testToRun: 'trailApexReplayDebugger.e2e.ts' + # vscodeVersion: ${{ inputs.vscodeVersion }} + # runId: ${{ inputs.runId }} + + slack_success_notification: + if: ${{ success() }} + needs: [apexLSP] + # needs: [apexLSP, apexReplayDebugger, debugApexTests, runApexTests, trailApexReplayDebugger] + uses: ./.github/workflows/slackNotification.yml + secrets: inherit + with: + title: 'Apex E2E Tests' + vscodeVersion: ${{ inputs.vscodeVersion }} + testsBranch: ${{ inputs.automationBranch }} + summary: '\n- Apex LSP: ${{ needs.apexLSP.result }}' + # summary: '\n- Apex LSP: ${{ needs.apexLSP.result }}\n- Apex Replay Debugger: ${{ needs.apexReplayDebugger.result }}\n- Debug Apex Tests: ${{ needs.debugApexTests.result }}\n- Run Apex Tests: ${{ needs.runApexTests.result }}\n- Trail Apex Replay Debugger: ${{ needs.trailApexReplayDebugger.result }}' + result: 'All the tests passed.' + workflow: 'actions/runs/${{ github.run_id }}' + type: 'e2e' + + slack_failure_notification: + if: ${{ failure() }} + needs: [apexLSP] + # needs: [apexLSP, apexReplayDebugger, debugApexTests, runApexTests, trailApexReplayDebugger] + uses: ./.github/workflows/slackNotification.yml + secrets: inherit + with: + title: 'Apex E2E Tests' + vscodeVersion: ${{ inputs.vscodeVersion }} + testsBranch: ${{ inputs.automationBranch }} + summary: '\n- Apex LSP: ${{ needs.apexLSP.result }}' + # summary: '\n- Apex LSP: ${{ needs.apexLSP.result }}\n- Apex Replay Debugger: ${{ needs.apexReplayDebugger.result }}\n- Debug Apex Tests: ${{ needs.debugApexTests.result }}\n- Run Apex Tests: ${{ needs.runApexTests.result }}\n- Trail Apex Replay Debugger: ${{ needs.trailApexReplayDebugger.result }}' + result: 'Not all the tests passed.' + workflow: 'actions/runs/${{ github.run_id }}' + type: 'e2e' + + slack_cancelled_notification: + if: ${{ cancelled() }} + needs: [apexLSP] + # needs: [apexLSP, apexReplayDebugger, debugApexTests, runApexTests, trailApexReplayDebugger] + uses: ./.github/workflows/slackNotification.yml + secrets: inherit + with: + title: 'Apex E2E Tests' + vscodeVersion: ${{ inputs.vscodeVersion }} + testsBranch: ${{ inputs.automationBranch }} + summary: '\n- Apex LSP: ${{ needs.apexLSP.result }}' + # summary: '\n- Apex LSP: ${{ needs.apexLSP.result }}\n- Apex Replay Debugger: ${{ needs.apexReplayDebugger.result }}\n- Debug Apex Tests: ${{ needs.debugApexTests.result }}\n- Run Apex Tests: ${{ needs.runApexTests.result }}\n- Trail Apex Replay Debugger: ${{ needs.trailApexReplayDebugger.result }}' + result: 'The workflow was cancelled.' + workflow: 'actions/runs/${{ github.run_id }}' + type: 'e2e' diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ac1653f3aa..bf3981b6df 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -74,15 +74,6 @@ jobs: vscodeVersion: ${{ inputs.vscodeVersion || '1.92.2' }} runId: ${{ inputs.runId || github.event.workflow_run.id }} - Core_E2E_tests_RedHat: - if: ${{ inputs.coreE2ETests || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }} - uses: ./.github/workflows/coreE2EredHat.yml - secrets: inherit - with: - automationBranch: ${{ inputs.automationBranch || 'main' }} - vscodeVersion: ${{ inputs.vscodeVersion || 'stable' }} - runId: ${{ inputs.runId || github.event.workflow_run.id }} - DeployAndRetrieve_E2E_tests: if: ${{ inputs.deployAndRetrieveE2ETests || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }} uses: ./.github/workflows/deployRetrieveE2E.yml @@ -137,15 +128,6 @@ jobs: vscodeVersion: '1.86.0' runId: ${{ github.event.workflow_run.id }} - Core_E2E_tests_RedHat_min_vscode_version: - if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }} - uses: ./.github/workflows/coreE2EredHat.yml - secrets: inherit - with: - automationBranch: 'main' - vscodeVersion: '1.86.0' - runId: ${{ github.event.workflow_run.id }} - DeployAndRetrieve_E2E_tests_min_vscode_version: if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }} uses: ./.github/workflows/deployRetrieveE2E.yml diff --git a/.github/workflows/e2eRedHat.yml b/.github/workflows/e2eRedHat.yml new file mode 100644 index 0000000000..bfbc580d3a --- /dev/null +++ b/.github/workflows/e2eRedHat.yml @@ -0,0 +1,73 @@ +name: End to End Tests - Redhat +on: + workflow_run: + workflows: + - Nightly Build Develop + - Test, Build, and Release + - Create and Test Beta Release Branch + types: + - completed + + workflow_dispatch: + inputs: + automationBranch: + description: 'Set the branch to use for automation tests in ESM' + required: false + default: 'main' + type: string + apexE2ETests: + description: 'Apex E2E Tests' + required: false + default: true + type: boolean + coreE2ETests: + description: 'Core E2E Tests' + required: false + default: true + type: boolean + vscodeVersion: + description: 'VSCode Version for ESM branches' + required: false + default: 'stable' + type: string + runId: + description: 'Run ID of the workflow run that created the vsixes' + required: true + type: string + +jobs: + Apex_E2E_tests_Redhat: + if: ${{ inputs.apexE2ETests || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }} + uses: ./.github/workflows/apexE2EredHat.yml + secrets: inherit + with: + automationBranch: ${{ inputs.automationBranch || 'main' }} + vscodeVersion: ${{ inputs.vscodeVersion || 'stable' }} + runId: ${{ inputs.runId || github.event.workflow_run.id }} + + Core_E2E_tests_RedHat: + if: ${{ inputs.coreE2ETests || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }} + uses: ./.github/workflows/coreE2EredHat.yml + secrets: inherit + with: + automationBranch: ${{ inputs.automationBranch || 'main' }} + vscodeVersion: ${{ inputs.vscodeVersion || 'stable' }} + runId: ${{ inputs.runId || github.event.workflow_run.id }} + + Apex_E2E_tests_Redhat_min_vscode_version: + if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }} + uses: ./.github/workflows/apexE2EredHat.yml + secrets: inherit + with: + automationBranch: 'main' + vscodeVersion: '1.86.0' + runId: ${{ github.event.workflow_run.id }} + + Core_E2E_tests_RedHat_min_vscode_version: + if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }} + uses: ./.github/workflows/coreE2EredHat.yml + secrets: inherit + with: + automationBranch: 'main' + vscodeVersion: '1.86.0' + runId: ${{ github.event.workflow_run.id }}