Skip to content

update action.

update action. #5

Workflow file for this run

name: Salesforce CI
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to run the tests on'
required: true
default: 'main'
jobs:
build:

Check failure on line 12 in .github/workflows/apex-tests-pr.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/apex-tests-pr.yml

Invalid workflow file

You have an error in your yaml syntax on line 12
runs-on: ubuntu-latest
- uses: actions/setup-node@v1
with:
node-version: '21.x'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Salesforce CLI
run: |
npm install sfdx-cli
node_modules/sfdx-cli/bin/run --version
node_modules/sfdx-cli/bin/run plugins --core
# Store Secret for debhub
- name: Populate auth file with DEVHUB_SFDX_URL secrets
shell: bash
run: |
echo ${{ secrets.DEVHUB_SFDX_URL }} > ./DEVHUB_SFDX_URL.txt
secretFileSize=$(wc -c "./DEVHUB_SFDX_URL.txt" | awk '{print $1}')
if [ $secretFileSize == 1 ]; then
echo "DEVHUB_SFDX_URL secret is empty or not set. Is this workflow running on a fork? Exiting...";
exit 1;
fi
- name: Authenticate to Dev Hub
run: sfdx auth:sfdxurl:store -f ./DEVHUB_SFDX_URL.txt -a devhub -d
- name: Create Scratch Org
run: sfdx force:org:create -s -f config/project-scratch-def.json -a MyScratchOrg
- name: Push Source to Scratch Org
run: sfdx force:source:push -u MyScratchOrg
- name: Run Apex Tests
run: sfdx force:apex:test:run -u MyScratchOrg --wait 10 --resultformat human --codecoverage