This is a sample workflow
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: Sample Workflow | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- 'force-app/**' | |
pull_request: | |
branches: [ master ] | |
paths: | |
- 'force-app/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.ref }} | |
fetch-depth: 0 | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event_name == 'push' | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '>=14' | |
check-latest: true | |
- name: Install Salesforce CLI | |
run: | | |
npm install sfdx-cli | |
node_modules/sfdx-cli/bin/run --version | |
node_modules/sfdx-cli/bin/run plugins --core | |
- name: 'Populate auth file with SFDX_URL secret' | |
shell: bash | |
run: 'echo ${{ secrets.SFDX_LR_TEST_URL}} > SFDX_QA' | |
- name: 'Authenticate against dev hub' | |
run: node_modules/sfdx-cli/bin/run force:auth:sfdxurl:store -f SFDX_QA -s -a LRQA | |
- name: Run Apex test | |
run: | |
node_modules/sfdx-cli/bin/run force:apex:test:run --resultformat tap --codecoverage -c -r human | |
- name: Deploy source | |
id: Deploy | |
if: github.event_name == 'push' | |
run: | |
node_modules/sfdx-cli/bin/run force:source:deploy -p diffdeploy/force-app -u LRQA --json --loglevel fatal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment