Skip to content

Commit

Permalink
testing copado yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdailey99 committed Sep 18, 2023
1 parent bb8bfab commit d9e4b11
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 28 deletions.
37 changes: 9 additions & 28 deletions .github/workflows/copado.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
provar_major_version: latest
provar_build_version: latest
provar_home: ${{ github.workspace }}/ProvarHome
test_environment: ${{ github.event.client_payload.orgname }}
test_environment: ${{ github.event.client_payload.environment }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down Expand Up @@ -50,49 +50,30 @@ jobs:
ls -la ${{ env.provar_home }}
ls -la ${{ env.provar_home }}/provardx
- name: List Authenticated Orgs and Set Default Username
run: |
sfdx force:org:list --clean
sfdx force:config:set defaultdevhubusername=${{ env.dev_hub_alias }} defaultusername=${{ env.dev_hub_alias }} --global
- name: Retrieve Azure Public IP and Set in Scratch Def
run: |
IP=($(curl -s http://ipinfo.io/json | jq '.ip' | sed -e 's/^"//' -e 's/"$//'))
echo "This GitHub Workflow agent public IP is: $IP"
bash ${GITHUB_WORKSPACE}/replace_ip_in_scratch_org_def.sh ${IP} project-scratch-def.json
- name: Create SFDX Project with config
run: |
sfdx project generate -n ProvarDX
cp project-scratch-def.json ProvarDX/config/project-scratch-def.json
cp .forceignore ProvarDX/.forceignore
- name: Insert Secrets Password
run: sed -i "s|ProvarSecretsPassword|${{ secrets.SECRETS_PASSWORD }}|" $GITHUB_WORKSPACE/provardx-properties-github.json

# - name: Create Scratch Org
# run: |
# sfdx force:org:create -f $GITHUB_WORKSPACE/ProvarDX/config/project-scratch-def.json -a ${{ env.scratch_org_alias }}
# sfdx force:org:display -u ${{ env.scratch_org_alias }}

# - name: Setup Dreamhouse App in Scratch Org
# run: bash ${GITHUB_WORKSPACE}/setup_dreamhouse.sh ${{ env.scratch_org_alias }}
run: sed -i "s|ProvarSecretsPassword|${{ secrets.SECRETS_PASSWORD }}|" $GITHUB_WORKSPACE/provardx-properties-github-copado.json

- name: Insert Test Environment
run: sed -i "s|ENVIRONMENT|${{ github.event.client_payload.environment }}|" $GITHUB_WORKSPACE/provardx-properties-github-copado.json

- name: Validate ProvarDX property file
run: sfdx provar:validate -p provardx-properties-github.json
run: sfdx provar:validate -p provardx-properties-github-copado.json

- name: Compile Provar Project
run: sfdx provar:compile -p provardx-properties-github.json
run: sfdx provar:compile -p provardx-properties-github-copado.json

- name: Reload Metadata Cache
run: sfdx provar:metadatacache -m 'Reload' -c '.provarCaches' -p provardx-properties-github.json
run: sfdx provar:metadatacache -m 'Reload' -c '.provarCaches' -p provardx-properties-github-copado.json

- name: Run Provar Tests
run: yes | xvfb-run sfdx provar:runtests -p provardx-properties-github.json
run: yes | xvfb-run sfdx provar:runtests -p provardx-properties-github-copado.json

# - name: Delete Scratch Org
# run: sfdx force:org:delete -u ${{ env.scratch_org_alias }} --noprompt

- name: Upload Test Results Folder
uses: actions/upload-artifact@v3
with:
Expand Down
33 changes: 33 additions & 0 deletions provardx-properties-github-copado.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"provarHome":"/home/runner/work/provardx/provardx/ProvarHome",
"projectPath":"/home/runner/work/provardx/provardx/ProvarProject",
"resultsPath":"/home/runner/work/provardx/provardx/ProvarProject/ANT/Results",
"resultsPathDisposition":"Replace",
"testOutputLevel":"WARNING",
"pluginOutputlevel":"WARNING",
"excludeCallable":false,
"stopOnError":false,
"lightningMode":true,
"connectionRefreshType":"Reuse",
"metadata":{
"metadataLevel":"Reuse",
"cachePath":"/home/runner/work/provardx/provardx/.provarCaches"
},
"testprojectSecrets": "ProvarSecretsPassword",
"environment":{
"testEnvironment":"ENVIRONMENT",
"webBrowser":"Chrome",
"webBrowserConfig":"Full Screen",
"webBrowserProviderName":"Desktop",
"webBrowserDeviceName":"Full Screen"
},
"testPlan":[
"Regression Plan"
],
"testplanFeatures": [
{"name": "PDF", "type": "OUTPUT", "enabled": "true"},
{"name": "PIECHART", "type": "OUTPUT", "enabled": "true"},
{"name": "EMAIL", "type": "NOTIFICATION", "enabled": "false"},
{"name": "TEST_MANAGER", "type": "REPORTING", "enabled": "true"}
]
}

0 comments on commit d9e4b11

Please sign in to comment.