Skip to content

Commit

Permalink
Add Codecov integration for apex (#6)
Browse files Browse the repository at this point in the history
* Add Codecov integration for apex

* --amend

* --amend

* --amend

* --amend

* --amend

* --amend

* --amend

* --amend

* --amend

* --amend

* --amend

* --amend

* --amend

* --amend

* --amend
  • Loading branch information
nicolasparrague authored and santiagoparradev committed Jun 7, 2024
1 parent 8683fe4 commit 4b90f6c
Show file tree
Hide file tree
Showing 6 changed files with 292 additions and 241 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: code-coverage
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Dependencies
run: |
sudo npm install -g sfdx-cli
- name: Populate auth file
run: 'echo "${{ secrets.SALESFORCE_AUTH_URL }}" > ./SALESFORCE_AUTH_URL.txt'

- 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: Deploy source
run: sfdx project deploy start -o targetOrg

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

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

0 comments on commit 4b90f6c

Please sign in to comment.