Skip to content

Commit

Permalink
chore: apex LSP running on redhat (#5906)
Browse files Browse the repository at this point in the history
* chore: apexlsp redhat

* chore: apexlsp redhat

* chore: new e2e main workflow
  • Loading branch information
CristiCanizales authored Oct 18, 2024
1 parent 3dd545d commit 892eca2
Show file tree
Hide file tree
Showing 3 changed files with 259 additions and 18 deletions.
186 changes: 186 additions & 0 deletions .github/workflows/apexE2EredHat.yml
Original file line number Diff line number Diff line change
@@ -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'
18 changes: 0 additions & 18 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/e2eRedHat.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 892eca2

Please sign in to comment.