-
Notifications
You must be signed in to change notification settings - Fork 244
116 lines (111 loc) · 4.67 KB
/
slow_integration_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Integration Tests
on:
pull_request_review:
types: [submitted]
workflow_call:
secrets:
CUMULUSCI_SERVICE_github:
required: true
CCITEST_APP_KEY:
required: true
workflow_dispatch:
env:
CUMULUSCI_KEY: ${{ secrets.CUMULUSCI_KEY }}
CUMULUSCI_SERVICE_github: ${{ secrets.CUMULUSCI_SERVICE_github }}
GITHUB_APP_ID: 129383
GITHUB_APP_KEY: ${{ secrets.CCITEST_APP_KEY }}
jobs:
org_backed_tests:
name: "Org-connected Tests"
runs-on: sfdc-ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install Python dependencies
run: |
python -m pip install -U pip
pip install -r requirements_dev.txt
- name: Install sfdx
run: |
mkdir sfdx
wget -qO- https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz | tar xJ -C sfdx --strip-components 1
echo $(realpath sfdx/bin) >> $GITHUB_PATH
- name: Authenticate Dev Hub
run: |
sfdx plugins --core
echo $SFDX_HUB_KEY_BASE64 | base64 --decode > sfdx.key
sfdx auth:jwt:grant --clientid $SFDX_CLIENT_ID --jwtkeyfile sfdx.key --username $SFDX_HUB_USERNAME --setdefaultdevhubusername -a hub
env:
SFDX_HUB_KEY_BASE64: ${{ secrets.SFDX_HUB_KEY_BASE64 }}
SFDX_CLIENT_ID: ${{ secrets.SFDX_CLIENT_ID }}
SFDX_HUB_USERNAME: ${{ secrets.SFDX_HUB_USERNAME }}
- name: Re-make VCR tapes (transiently)
run: make vcr
- name: Delete scratch org
if: always()
run: |
cci org scratch_delete pytest
robot_ui:
name: "Robot: ${{ matrix.job-name }}"
runs-on: sfdc-ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- browser: "BROWSER:headlesschrome"
job-name: "Chrome"
org-shape: "dev"
# - browser: "BROWSER:headlessfirefox"
# job-name: "Firefox"
# org-shape: "dev"
# - browser: "BROWSER:headlesschrome"
# job-name: "Pre-release"
# org-shape: "prerelease"
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install Python dependencies
run: pip install -r requirements_dev.txt
- name: Install sfdx
run: |
mkdir sfdx
wget -qO- https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz | tar xJ -C sfdx --strip-components 1
echo $(realpath sfdx/bin) >> $GITHUB_PATH
- name: Initialize Browser/Playwright
run: cci robot install_playwright
- name: Authenticate Dev Hub
run: |
sfdx plugins --core
echo $SFDX_HUB_KEY_BASE64 | base64 --decode > sfdx.key
sfdx auth:jwt:grant --clientid $SFDX_CLIENT_ID --jwtkeyfile sfdx.key --username $SFDX_HUB_USERNAME --setdefaultdevhubusername -a hub
env:
SFDX_HUB_KEY_BASE64: ${{ secrets.SFDX_HUB_KEY_BASE64 }}
SFDX_CLIENT_ID: ${{ secrets.SFDX_CLIENT_ID }}
SFDX_HUB_USERNAME: ${{ secrets.SFDX_HUB_USERNAME }}
- name: Run robot tests
run: |
coverage run --append $(which cci) task run robot \
--org ${{ matrix.org-shape }} \
-o suites cumulusci/robotframework/tests/salesforce \
-o exclude no-browser \
-o vars ${{ matrix.browser }}
- name: Delete scratch org
if: always()
run: |
cci org scratch_delete ${{ matrix.org-shape }}
- name: Store robot results
if: failure()
uses: actions/upload-artifact@v1
with:
name: robot
path: robot/CumulusCI/results