Created
January 24, 2020 16:26
-
-
Save gavinhughpalmer/b29e4520f14f3764c84b86ccd6a5d1f3 to your computer and use it in GitHub Desktop.
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
| image: salesforce/salesforcedx | |
| pipelines: | |
| default: | |
| - step: | |
| name: Run Static Analysis | |
| image: ghpalmer/staticanalysis | |
| script: | |
| - pmd -d ./force-app/ -R "./apex-ruleset.xml" -f text -l apex | |
| - cpd --minimum-tokens 100 --files ./force-app/ --language apex | |
| - step: | |
| name: Compile and Run Tests | |
| script: | |
| - mkdir keys | |
| - echo $SFDC_SERVER_KEY | base64 -d > keys/server.key | |
| - sfdx force:auth:jwt:grant --clientid $CLIENT_ID --jwtkeyfile keys/server.key --username $USERNAME --setdefaultdevhubusername | |
| - sfdx force:org:create --definitionfile config/project-scratch-def.json --setalias TestRunner --durationdays 1 | |
| - sfdx force:source:push --targetusername TestRunner --forceoverwrite | |
| - sfdx force:apex:test:run --testlevel RunLocalTests --outputdir test-results --resultformat tap --targetusername TestRunner --codecoverage --wait 10 | |
| - sfdx force:org:delete --noprompt --targetusername TestRunner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment