Manual Build Check #89
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Manual Build Check | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| manual-build-check: | |
| runs-on: ubuntu-latest | |
| env: | |
| SF_DISABLE_SOURCE_MEMBER_POLLING: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: 'Install Salesforce CLI' | |
| run: | | |
| wget https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-linux-x64.tar.xz | |
| mkdir ~/sfdx | |
| tar xJf sf-linux-x64.tar.xz -C ~/sfdx --strip-components 1 | |
| echo "$HOME/sfdx/bin" >> $GITHUB_PATH | |
| ~/sfdx/bin/sf version | |
| - name: Authenticate DevHub | |
| run: | | |
| echo ${{ secrets.SALESFORCE_DEVHUB_AUTH }} > sfdxurl.txt | |
| sf auth:sfdxurl:store --sfdx-url-file sfdxurl.txt --alias devhub --set-default-dev-hub | |
| # sfdx auth:sfdxurl:store --sfdxurlfile sfdxurl.txt --setalias devhub --setdefaultdevhubusername | |
| - name: Define CI org | |
| run: sf org create scratch -v devhub --set-default -f config/project-scratch-def.json -a ciorg | |
| # sfdx force:org:create -v devhub -s -f config/project-scratch-def.json -a ciorg -d 1 | |
| - name: Installing SF managed packages | |
| run: sf package install --package "04t4W0000038bemQAA" -o ciorg -w 15 --no-prompt | |
| - name: Installing Health Cloud managed package | |
| run: sf package install --package "04t4W000002V2Ub" -o ciorg -w 15 --no-prompt | |
| - name: Installing the IAM package | |
| run: sf package install --package "04tJQ0000014BvZYAU" -o ciorg -w 15 --no-prompt | |
| - name: Set deployment user standard security | |
| run: | | |
| sf org assign permsetlicense -o ciorg -n "OmniStudio" | |
| sf org assign permsetlicense -o ciorg -n "OmniStudio User" | |
| sf org assign permset -o ciorg -n OmniStudioAdmin | |
| sf org assign permset -o ciorg -n OmniStudioExecution | |
| sf org assign permsetlicense -o ciorg -n "Health Cloud" || true | |
| sf org assign permsetlicense -o ciorg -n "Health Cloud Platform" ||true | |
| sf org assign permset -o ciorg -n HealthCloudFoundation || true | |
| sf org assign permset -o ciorg -n DocGenDesigner | |
| sf org assign permset -o ciorg -n DocGenUser | |
| sf org assign permset -o ciorg -n BREDesigner | |
| sf org assign permset -o ciorg -n BRERuntime | |
| sf org assign permsetlicense -o ciorg -n BREDesigner | |
| sf org assign permsetlicense -o ciorg -n BRERuntime | |
| - name: Deploy source dev-app-pre | |
| run: sf project deploy start -d dev-app-pre -o ciorg | |
| - name: Deploy source force-app | |
| run: sf project deploy start -d force-app -o ciorg --ignore-conflicts | |
| - name: Deploy source default objects | |
| run: sf project deploy start -d force-app/main/default/objects -o ciorg --ignore-conflicts -w 15 | |
| - name: Deploy source default queues | |
| run: sf project deploy start -d force-app/main/default/queues -o ciorg -w 15 | |
| - name: Deploy source default OmniStudio-Components | |
| run: sf project deploy start -d OmniStudio-Components -o ciorg -c | |
| - name: Re-Deploy OmniScripts in OmniStudio Folder | |
| run: sf project deploy start -d OmniStudio-Components/main/default/omniScripts -o ciorg -c | |
| - name: Deploy source default dev-app-post | |
| run: sf project deploy start -d dev-app-post -o ciorg -c | |
| # The changes were made in accordance with Salesforce recommendations to move from sfdx commands to sf-style commands | |
| # sfdx force:source:push -u ciorg | |
| - name: Set deployment user custom security | |
| run: | | |
| sf org assign permset -o ciorg -n SA_Administrator | |
| sf apex run -o ciorg --file scripts/apex/scratchorg-set-current-user.apex | |
| # sf force:apex:execute -o ciorg -f scripts/apex/scratchorg-set-current-user.apex | |
| # sfdx force:user:permset:assign -u ciorg -n SA_Administrator | |
| # sfdx force:apex:execute -u ciorg -f scripts/apex/scratchorg-set-current-user.apex | |
| - name: Run Apex test | |
| run: sf apex run test -c -r human | |
| - name: Delete scratch org | |
| if: ${{ always() }} | |
| run: sf org delete scratch -o ciorg -p | |
| # sfdx force:org:delete -u ciorg -p |