Skip to content

Commit

Permalink
chore: E2E Tests, Base Suite, and Test Build and Release GHA workflow…
Browse files Browse the repository at this point in the history
…s run jobs only when their predecessor completes successfully (#5572)

* chore: force buildAll.yml to fail to make Nightly Build Develop fail

* chore: comment out unit tests job in buildAndTest.yml to decrease iteration time

* fix: base suite jobs only run when workflow_run conclusion is success

* fix: e2e tests jobs only run when workflow_run conclusion is success

* chore: update to version 60.11.1

* fix: test build and release workflow runs only when prerelease completes successfully

* chore: comment out slack notification in mergeReleaseBranch.yml

* chore: comment out non passing jobs in test build and release for testing

* chore: fix typo and remove extra parentheses

* chore: fix error

* chore: uncomment commented code

* chore: revert all package.json files to correct version

* chore: add back newlines at the end of all package.json files
  • Loading branch information
daphne-sfdc authored May 6, 2024
1 parent 02fee8e commit 71bd344
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/baseSuiteE2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ on:

jobs:
anInitialSuite:
if: ${{ inputs.anInitialSuite || github.event_name == 'workflow_run' }}
if: ${{ inputs.anInitialSuite || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/runE2ETest.yml
secrets: inherit
with:
Expand All @@ -125,7 +125,7 @@ jobs:
os: ${{ inputs.os || '["ubuntu-latest"]' }}

authentication:
if: ${{ inputs.authentication || github.event_name == 'workflow_run' }}
if: ${{ inputs.authentication || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/runE2ETest.yml
secrets: inherit
with:
Expand All @@ -136,7 +136,7 @@ jobs:
os: ${{ inputs.os || '["ubuntu-latest"]' }}

lwcLSP:
if: ${{ inputs.lwcLsp || github.event_name == 'workflow_run' }}
if: ${{ inputs.lwcLsp || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/runE2ETest.yml
secrets: inherit
with:
Expand All @@ -147,7 +147,7 @@ jobs:
os: ${{ inputs.os || '["ubuntu-latest"]' }}

deployAndRetrieve:
if: ${{ inputs.deployAndRetrieve || github.event_name == 'workflow_run' }}
if: ${{ inputs.deployAndRetrieve || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/runE2ETest.yml
secrets: inherit
with:
Expand All @@ -158,7 +158,7 @@ jobs:
os: ${{ inputs.os || '["ubuntu-latest"]' }}

apexLSP:
if: ${{ inputs.apexLsp || github.event_name == 'workflow_run' }}
if: ${{ inputs.apexLsp || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/runE2ETest.yml
secrets: inherit
with:
Expand All @@ -169,7 +169,7 @@ jobs:
os: ${{ inputs.os || '["ubuntu-latest"]' }}

runApexTests:
if: ${{ inputs.runApexTests || github.event_name == 'workflow_run' }}
if: ${{ inputs.runApexTests || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/runE2ETest.yml
secrets: inherit
with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ on:

jobs:
Apex_E2E_tests:
if: ${{ inputs.apexE2ETests || github.event_name == 'workflow_run' }}
if: ${{ inputs.apexE2ETests || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/apexE2E.yml
secrets: inherit
with:
Expand All @@ -55,7 +55,7 @@ jobs:
runId: ${{ inputs.runId || github.event.workflow_run.id }}

Core_E2E_tests:
if: ${{ inputs.coreE2ETests || github.event_name == 'workflow_run' }}
if: ${{ inputs.coreE2ETests || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/coreE2E.yml
secrets: inherit
with:
Expand All @@ -64,7 +64,7 @@ jobs:
runId: ${{ inputs.runId || github.event.workflow_run.id }}

DeployAndRetrieve_E2E_tests:
if: ${{ inputs.deployAndRetrieveE2ETests || github.event_name == 'workflow_run' }}
if: ${{ inputs.deployAndRetrieveE2ETests || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/deployRetrieveE2E.yml
secrets: inherit
with:
Expand All @@ -73,7 +73,7 @@ jobs:
runId: ${{ inputs.runId || github.event.workflow_run.id }}

LSP_E2E_tests:
if: ${{ inputs.lspE2ETests || github.event_name == 'workflow_run' }}
if: ${{ inputs.lspE2ETests || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
uses: ./.github/workflows/lspE2E.yml
secrets: inherit
with:
Expand All @@ -82,7 +82,7 @@ jobs:
runId: ${{ inputs.runId || github.event.workflow_run.id }}

# Apex_E2E_tests_min_vscode_version:
# if: ${{ github.event_name == 'workflow_run' }}
# if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }}
# uses: ./.github/workflows/apexE2E.yml
# secrets: inherit
# with:
Expand All @@ -91,7 +91,7 @@ jobs:
# runId: ${{ inputs.runId || github.event.workflow_run.id }}

# Core_E2E_tests_min_vscode_version:
# if: ${{ github.event_name == 'workflow_run' }}
# if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }}
# uses: ./.github/workflows/coreE2E.yml
# secrets: inherit
# with:
Expand All @@ -100,7 +100,7 @@ jobs:
# runId: ${{ inputs.runId || github.event.workflow_run.id }}

# DeployAndRetrieve_E2E_tests_min_vscode_version:
# if: ${{ github.event_name == 'workflow_run' }}
# if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }}
# uses: ./.github/workflows/deployRetrieveE2E.yml
# secrets: inherit
# with:
Expand All @@ -109,7 +109,7 @@ jobs:
# runId: ${{ inputs.runId || github.event.workflow_run.id }}

# LSP_E2E_tests_min_vscode_version:
# if: ${{ github.event_name == 'workflow_run' }}
# if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }}
# uses: ./.github/workflows/lspE2E.yml
# secrets: inherit
# with:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/testBuildAndRelease.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Test, Build, and Release
on:
push:
branches:
- 'main'
workflow_run:
workflows:
- PreRelease
types:
- completed

jobs:
get-version:
if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' }}
name: 'Get Release Version'
runs-on: ubuntu-latest
outputs:
Expand Down

0 comments on commit 71bd344

Please sign in to comment.