Skip to content

Fix test error for existing orgs with validation rules on Account #61

Fix test error for existing orgs with validation rules on Account

Fix test error for existing orgs with validation rules on Account #61

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: ">=14"
check-latest: true
- name: Install Salesforce CLI + Scanner
run: |
npm install @salesforce/cli -g
sf --version
sf plugins --core
sf plugins install @salesforce/sfdx-scanner
- name: Run SFDX Scanner - Report findings as comments
uses: mitchspano/[email protected]
with:
severity-threshold: 4
report-mode: comments
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Authenticate into DevHub
run: |
echo "${SALESFORCE_JWT_SECRET_KEY}" > server.key
sf org login jwt --client-id ${{ secrets.SALESFORCE_CONSUMER_KEY }} --jwt-key-file server.key --username ${{ secrets.SALESFORCE_DEVHUB_USERNAME}} --set-default-dev-hub --alias devhub
env:
SALESFORCE_JWT_SECRET_KEY: ${{ secrets.SALESFORCE_JWT_SECRET_KEY }}
- name: Validate Contents in a Scratch Org
run: |
sf org create scratch --target-dev-hub devhub --set-default --definition-file config/project-scratch-def.json --alias scratchOrg --duration-days 1
sf project deploy start --target-org scratchOrg
sf apex run test --code-coverage --result-format human --synchronous
sf org delete scratch --no-prompt --target-org scratchOrg