-
Notifications
You must be signed in to change notification settings - Fork 245
136 lines (131 loc) · 4.95 KB
/
feature_test.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Feature Test
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened] # Default
push:
branches:
- main
jobs:
lint:
name: Lint
if: ${{ contains(fromJSON('["workflow_dispatch", "pull_request"]'), github.event_name) }}
uses: SFDO-Tooling/.github/.github/workflows/pre-commit.yml@main
docs:
name: Build Docs
if: ${{ github.event_name == 'pull_request' }}
runs-on: SFDO-Tooling-Ubuntu
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python 3.11
id: py
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Set up uv
uses: SFDO-Tooling/setup-uv@main
with:
version: "0.5.0"
enable-cache: true
- name: Install dependencies
run: uv sync --group docs
- name: Build Docs
run: |
cd docs
uv run sphinx-build -b html . ./_build
unit_tests:
name: "Unit tests: ${{ matrix.os }}-${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, SFDO-Tooling-Ubuntu, SFDO-Tooling-Windows]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- name: Set up uv
uses: SFDO-Tooling/setup-uv@main
with:
version: "0.5.0"
enable-cache: true
- name: Install dependencies
run: uv sync -p ${{ matrix.python-version }}
- name: Run Pytest
run: uv run pytest --cov-report= --cov=cumulusci
unit_tests_opt_deps:
name: "Unit tests with optional dependencies: ${{ matrix.os }}-${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, SFDO-Tooling-Ubuntu, SFDO-Tooling-Windows]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- name: Set up uv
uses: SFDO-Tooling/setup-uv@main
with:
version: "0.5.0"
enable-cache: true
- name: Install dependencies
run: uv sync --all-extras -p ${{ matrix.python-version }}
- name: Run Pytest
run: uv run pytest --cov-report= --cov=cumulusci
robot_api:
name: "Robot: No browser"
runs-on: SFDO-Tooling-Ubuntu
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Set up uv
uses: SFDO-Tooling/setup-uv@main
with:
version: "0.5.0"
enable-cache: true
- name: Install dependencies
run: uv sync -p 3.11
- name: Install sfdx
run: |
mkdir sfdx
wget -qO- https://developer.salesforce.com/media/salesforce-cli/sf/channels/stable/sf-linux-x64.tar.xz | tar xJ -C sfdx --strip-components 1
echo $(realpath sfdx/bin) >> $GITHUB_PATH
- name: Authenticate Dev Hub
run: |
sf plugins --core
echo $SFDX_HUB_KEY_BASE64 | base64 --decode > sfdx.key
sf org login jwt --client-id $SFDX_CLIENT_ID --jwt-key-file 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: |
uv run cci task run robot \
--org dev \
-o name "CumulusCI" \
-o suites cumulusci/robotframework/tests \
-o include no-browser
- name: Delete scratch org
if: always()
run: |
uv run cci org scratch_delete dev
- name: Store robot results
if: failure()
uses: actions/upload-artifact@v4
with:
name: robot
path: robot/CumulusCI/results