Last active
January 25, 2021 22:11
-
-
Save hpmohan/7991e850f174f7e14b142533bdd9df77 to your computer and use it in GitHub Desktop.
Run test on pull request
This file contains hidden or 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: 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 |
This file contains hidden or 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: 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