Skip to content

Commit

Permalink
--amend
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasparrague committed Jun 5, 2024
1 parent 6792fb1 commit 4c5e644
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,27 @@ jobs:
- name: Authenticate Dev Hub
run: 'sfdx force:auth:sfdxurl:store -f ./SALESFORCE_AUTH_URL.txt -a devhub -d'

- name: Authenticate Target Org
run: 'sfdx force:auth:sfdxurl:store -f ./SALESFORCE_AUTH_URL.txt -a targetOrg'
- name: Delete Existing Scratch Orgs
run: |
sfdx force:org:list --json | jq -r '.result.scratchOrgs[] | select(.status == "Active") | .alias' | xargs -I {} sfdx org delete scratch -u {} --no-prompt
# - name: Create Scratch Org
# run: sfdx org create scratch --target-dev-hub devhub --definition-file config/project-scratch-def.json --alias ciorg --set-default

- name: Create Scratch Org
run: sfdx org create scratch -f config/project-scratch-def.json -a ciorg -s -d 1

- name: Deploy source
run: sfdx project deploy start -o targetOrg
run: sfdx project deploy start -o ciorg --source-dir ./force-app

- name: Run Apex tests
run: sfdx apex run test -o targetOrg --codecoverage --resultformat human -d ./
run: sfdx force:apex:test:run --codecoverage --resultformat human -d ./ -o ciorg

- name: Upload code coverage for Apex to Codecov.io
uses: codecov/codecov-action@v2
with:
flags: Apex

- name: Delete Scratch Org
if: always()
run: sfdx org delete scratch -u ciorg --no-prompt | -p

0 comments on commit 4c5e644

Please sign in to comment.