From 5a8e0943dc91fa1f283be4e225b9e30f5e161e15 Mon Sep 17 00:00:00 2001 From: "John M. Daniel" Date: Mon, 18 Dec 2023 23:45:08 -0500 Subject: [PATCH] adjusted to include the checking against the force-di-samples project --- .github/workflows/deploy.and.test.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/deploy.and.test.yml b/.github/workflows/deploy.and.test.yml index 5d0a313..ef135e0 100644 --- a/.github/workflows/deploy.and.test.yml +++ b/.github/workflows/deploy.and.test.yml @@ -19,6 +19,8 @@ jobs: uses: apex-enterprise-patterns/setup-sfdx@v2 #We're using a fork of https://github.com/sfdx-actions/setup-sfdx for safety with: sfdx-auth-url: ${{ secrets.DEVHUB_SFDXURL }} + # Install the required plugins + - run: echo y | sf plugins install shane-sfdx-plugins # Setup the config parameters needed - run: sf config set target-dev-hub SFDX-ENV --global #Even though the setup-sfdx action uses --setdefaultdevhubusername, it doesn't seem to stick since it uses --setdefaultusername so we brute force it here # Create the scratch org @@ -27,6 +29,14 @@ jobs: - run: sf project deploy start # Run the core framework tests - run: sf apex run test --wait 5 + # Intentionally install the Sample Code after the core AEP Commons test pass succeeds so that we don't deploy anything in Sample Code + # that could mask a test failure. A much more involved solution would've been to do a workflow_dispatch to the samplecode project. + - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo force-di-samples --path force-app-1 + - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo force-di-samples --path force-app-2 + - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo force-di-samples --path force-app-3 + - run: sf shane github src install --convert --githubuser apex-enterprise-patterns --repo force-di-samples --path force-di-trigger-demo + # Run the core framework tests and the sample code project tests + - run: sf apex run test --wait 5 - name: Destroy scratch org run: sf org delete scratch --no-prompt if: always()