Skip to content

Instantly share code, notes, and snippets.

@hpmohan
Last active January 25, 2021 22:11
Show Gist options
  • Save hpmohan/7991e850f174f7e14b142533bdd9df77 to your computer and use it in GitHub Desktop.
Save hpmohan/7991e850f174f7e14b142533bdd9df77 to your computer and use it in GitHub Desktop.
Run test on pull request
name: Deploy on Push
on:
push:
branches:
- Dev
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: sfdx-actions/setup-sfdx@v1
with:
sfdx-auth-url: ${{ secrets.AUTH_SECRET }}
- name: sfdx-test-run
run: sfdx force:apex:test:run -l RunLocalTests -w 30
- name: 'Convert Metadata'
run: sfdx force:source:convert --rootdir=force-app --outputdir=convert
- name: 'Run Test on Metadata'
run: sfdx force:mdapi:deploy --deploydir=convert --testlevel=RunLocalTests --checkonly
name: Test On PullRequest
on:
pull_request:
branches: [ Dev ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: sfdx-actions/setup-sfdx@v1
with:
sfdx-auth-url: ${{ secrets.AUTH_SECRET }}
- name: sfdx-test-run
run: sfdx force:apex:test:run -l RunLocalTests -w 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment