[DevOps Center] Merge WI-000027 to Integration #5
This file contains 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: validate deployment | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- integration | |
paths: | |
- 'force-app/**' | |
jobs: | |
validate-deployment: | |
name: 'Validate Deployment, run local Tests' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Install Salesforce CLI' | |
run: | | |
npm install @salesforce/cli --location=global | |
sf --version | |
- name: 'Populate auth file with DEVHUB_SFDX_URL secret' | |
run: | | |
echo ${{ secrets.INTEGRATION_SANDBOX_SFDX_URL}} > ./INTEGRATION_SANDBOX_SFDX_URL.auth | |
- name: Authenticate against integration sandbox | |
run: | |
sf org login sfdx-url --sfdx-url-file ./INTEGRATION_SANDBOX_SFDX_URL.auth | |
--set-default --alias integration_sandbox | |
- name: Validate deployment and run local tests | |
run: | |
sf project deploy validate --source-dir force-app --wait 120 | |
--test-level=RunLocalTests --ignore-conflicts -target-org integration_sandbox |