Merge pull request #8 from nylas/fix-package-version #8
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: Salesforce CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Salesforce CLI | |
uses: forcedotcom/sfdx-action@v1 | |
with: | |
version: latest | |
- name: Authenticate to Dev Hub | |
run: sfdx auth:jwt:grant --clientid ${{ secrets.SF_CLIENT_ID }} --jwtkeyfile assets/server.key --username ${{ secrets.SF_DEV_HUB_USERNAME }} --instanceurl https://login.salesforce.com --setdefaultdevhubusername | |
- 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 |