Skip to content

Commit 81a4f35

Browse files
authored
rolling up main to beta 2026-04-01 (#2871)
rolling main up to beta for beta release 2026-04-01
2 parents aca8e37 + 3648699 commit 81a4f35

627 files changed

Lines changed: 22114 additions & 5235 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Run Jenkins driver tests
2+
on:
3+
pull_request:
4+
paths:
5+
- 'drivers/**'
6+
7+
jobs:
8+
trigger-driver-test:
9+
strategy:
10+
matrix:
11+
version:
12+
[ 60 ]
13+
14+
runs-on: ubuntu-latest
15+
steps:
16+
17+
- name: Create Commit Status (Pending)
18+
id: status
19+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
20+
with:
21+
script: |
22+
core.setOutput('status_url', (await github.rest.repos.createCommitStatus({
23+
owner: context.repo.owner,
24+
repo: context.repo.repo,
25+
sha: context.sha,
26+
state: 'pending',
27+
description: 'Jenkins job triggered...',
28+
context: 'Driver Tests (${{ matrix.version }})'
29+
})).data.url);
30+
- name: Trigger Jenkins Generic Webhook
31+
env:
32+
JENKINS_WEBHOOK_TOKEN: ${{ secrets.JENKINS_WEBHOOK_TOKEN }}
33+
JENKINS_WEBHOOK_URL: ${{ secrets.JENKINS_WEBHOOK_URL }}
34+
STATUS_URL: ${{ steps.status.outputs.status_url }}
35+
run: |
36+
set +x
37+
curl -s -o /dev/null -X POST \
38+
-H "Content-Type: application/json" \
39+
-H "Authorization: Bearer ${JENKINS_WEBHOOK_TOKEN}" \
40+
-d "{\"status_url\": \"$STATUS_URL\",
41+
\"version\": ${{ matrix.version }},
42+
\"commit\": ${{ github.event.pull_request.head.sha }} }" \
43+
"${JENKINS_WEBHOOK_URL}"
44+
set -x

.github/workflows/run-tests.yml

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -39,51 +39,10 @@ jobs:
3939
id: cache_key
4040
run: echo "CACHE_KEY=${{ steps.lib-version.outputs.url }}-v1" >> $GITHUB_OUTPUT
4141

42-
get-dev-artifact:
43-
runs-on: ubuntu-latest
44-
outputs:
45-
cache_key: ${{ steps.cache_key.outputs.CACHE_KEY }}
46-
if: ${{ contains(join(github.event.pull_request.labels.*.name), 'release-') && github.event.pull_request.head.repo.fork != 'true' }}
47-
steps:
48-
- name: Get the version from the label
49-
id: label-version
50-
run: |
51-
echo "${{ join(github.event.pull_request.labels.*.name) }}" | grep -oP "release-\d+.\d+" | xargs > out
52-
echo "LIBRARY_VERSION=$(cat out)" >> $GITHUB_OUTPUT
53-
mkdir /home/runner/work/lua_libs
54-
- name: Find latest artifact
55-
id: latest
56-
env:
57-
ARTIFACTORY_URL: ${{ format('https://smartthings.jfrog.io/artifactory/edge-driver-libs/{0}/', steps.label-version.outputs.LIBRARY_VERSION) }}
58-
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
59-
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
60-
run: |
61-
wget --user=$ARTIFACTORY_USERNAME --password=$ARTIFACTORY_PASSWORD $ARTIFACTORY_URL -q -O - | grep '.zip' | awk -F' ' '{print $3"-"$4"\t"$2}' | sort -t - -k3n -k2M -k1n -k4n | tail -1 | grep -o 'lua_libs_[a-z0-9_]*.zip' | head -1 > out
62-
echo "ZIP_FILE=$(cat out)" >> $GITHUB_OUTPUT
63-
- name: Try to retrieve cache
64-
id: cached-libs
65-
uses: actions/cache@v3
66-
with:
67-
path: '/home/runner/work/lua_libs'
68-
key: ${{ steps.latest.outputs.ZIP_FILE }}-v1
69-
- name: Download and unpack specified version
70-
if: steps.cached-libs.outputs.cache-hit != 'true'
71-
env:
72-
ARTIFACTORY_URL: ${{ format('https://smartthings.jfrog.io/artifactory/edge-driver-libs/{0}/{1}', steps.label-version.outputs.LIBRARY_VERSION, steps.latest.outputs.ZIP_FILE) }}
73-
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
74-
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
75-
working-directory: '/home/runner/work/lua_libs'
76-
run: |
77-
wget --user=$ARTIFACTORY_USERNAME --password=$ARTIFACTORY_PASSWORD $ARTIFACTORY_URL -O lua_libs.zip
78-
unzip lua_libs.zip
79-
- name: Set output
80-
id: cache_key
81-
run: echo "CACHE_KEY=${{ steps.latest.outputs.ZIP_FILE }}-v1" >> $GITHUB_OUTPUT
82-
8342
run-driver-tests:
8443
runs-on: ubuntu-latest
8544
needs:
86-
[ get-latest-release-artifact, get-dev-artifact ]
45+
[ get-latest-release-artifact ]
8746
if: ${{ always() && contains(needs.*.result, 'success') && !contains(needs.*.result, 'failure') }}
8847
steps:
8948
- name: Set cache key

drivers/SmartThings/matter-appliance/src/test/test_cook_top.lua

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ test.register_coroutine_test(
8989
local component_to_endpoint_map = mock_device:get_field("__component_to_endpoint_map")
9090
assert(component_to_endpoint_map["cookSurfaceOne"] == COOK_SURFACE_ONE_ENDPOINT, "Cook Surface One Endpoint must be 2")
9191
assert(component_to_endpoint_map["cookSurfaceTwo"] == COOK_SURFACE_TWO_ENDPOINT, "Cook Surface Two Endpoint must be 3")
92-
end
92+
end,
93+
{
94+
min_api_version = 19
95+
}
9396
)
9497

9598
test.register_message_test(
@@ -112,6 +115,9 @@ test.register_message_test(
112115
clusters.OnOff.server.commands.Off(mock_device, COOK_TOP_ENDPOINT)
113116
}
114117
}
118+
},
119+
{
120+
min_api_version = 19
115121
}
116122
)
117123

@@ -149,6 +155,9 @@ test.register_message_test(
149155
clusters.TemperatureControl.server.commands.SetTemperature(mock_device, COOK_SURFACE_TWO_ENDPOINT, nil, 0) --0 is the index where Level1 is stored.
150156
}
151157
},
158+
},
159+
{
160+
min_api_version = 19
152161
}
153162
)
154163

@@ -181,6 +190,9 @@ test.register_message_test(
181190
direction = "send",
182191
message = mock_device:generate_test_message("cookSurfaceTwo", capabilities.temperatureMeasurement.temperature({ value = 20.0, unit = "C" }))
183192
}
193+
},
194+
{
195+
min_api_version = 19
184196
}
185197
)
186198

drivers/SmartThings/matter-appliance/src/test/test_dishwasher.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ test.register_message_test(
101101
clusters.OnOff.server.commands.Off(mock_device, APPLICATION_ENDPOINT)
102102
}
103103
}
104+
},
105+
{
106+
min_api_version = 19
104107
}
105108
)
106109

@@ -166,6 +169,9 @@ test.register_message_test(
166169
}))
167170
}
168171
}, -- on receiving NO ERROR we don't do anything.
172+
},
173+
{
174+
min_api_version = 19
169175
}
170176
)
171177

@@ -231,6 +237,9 @@ test.register_message_test(
231237
}))
232238
}
233239
}, -- on receiving NO ERROR we don't do anything.
240+
},
241+
{
242+
min_api_version = 19
234243
}
235244
)
236245

@@ -296,6 +305,9 @@ test.register_message_test(
296305
}))
297306
}
298307
}, -- on receiving NO ERROR we don't do anything.
308+
},
309+
{
310+
min_api_version = 19
299311
}
300312
)
301313

@@ -372,6 +384,9 @@ test.register_message_test(
372384
}))
373385
}
374386
}, -- on receiving NO ERROR we don't do anything.
387+
},
388+
{
389+
min_api_version = 19
375390
}
376391
)
377392

@@ -433,6 +448,9 @@ test.register_message_test(
433448
clusters.DishwasherMode.server.commands.ChangeToMode(mock_device, APPLICATION_ENDPOINT, 1) --1 is the index where Super Dry is stored.
434449
}
435450
}
451+
},
452+
{
453+
min_api_version = 19
436454
}
437455
)
438456

@@ -470,6 +488,9 @@ test.register_message_test(
470488
clusters.TemperatureControl.server.commands.SetTemperature(mock_device, APPLICATION_ENDPOINT, nil, 0) --0 is the index where Level1 is stored.
471489
}
472490
},
491+
},
492+
{
493+
min_api_version = 19
473494
}
474495
)
475496

@@ -526,6 +547,9 @@ test.register_message_test(
526547
clusters.TemperatureControl.commands.SetTemperature(mock_device, APPLICATION_ENDPOINT, 40 * 100, nil)
527548
}
528549
},
550+
},
551+
{
552+
min_api_version = 19
529553
}
530554
)
531555

drivers/SmartThings/matter-appliance/src/test/test_extractor_hood.lua

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,9 @@ test.register_message_test(
174174
clusters.FanControl.attributes.PercentSetting:write(mock_device, 1, 50)
175175
}
176176
}
177+
},
178+
{
179+
min_api_version = 19
177180
}
178181
)
179182

@@ -245,6 +248,9 @@ test.register_message_test(
245248
direction = "send",
246249
message = mock_device:generate_test_message("main", capabilities.fanMode.fanMode("auto"))
247250
}
251+
},
252+
{
253+
min_api_version = 19
248254
}
249255
)
250256

@@ -331,6 +337,9 @@ test.register_message_test(
331337
clusters.FanControl.attributes.FanMode:write(mock_device, 1, clusters.FanControl.types.FanModeEnum.AUTO)
332338
}
333339
}
340+
},
341+
{
342+
min_api_version = 19
334343
}
335344
)
336345
test.register_message_test(
@@ -441,6 +450,9 @@ test.register_message_test(
441450
capabilities.fanMode.fanMode.high.NAME
442451
}, {visibility={displayed=false}}))
443452
}
453+
},
454+
{
455+
min_api_version = 19
444456
}
445457
)
446458

@@ -476,6 +488,9 @@ test.register_message_test(
476488
direction = "send",
477489
message = mock_device:generate_test_message("main", capabilities.windMode.windMode.naturalWind())
478490
}
491+
},
492+
{
493+
min_api_version = 19
479494
}
480495
)
481496

@@ -514,6 +529,9 @@ test.register_message_test(
514529
clusters.FanControl.attributes.WindSetting:write(mock_device, 1, clusters.FanControl.types.WindSettingMask.NATURAL_WIND)
515530
}
516531
}
532+
},
533+
{
534+
min_api_version = 19
517535
}
518536
)
519537

@@ -572,6 +590,9 @@ test.register_message_test(
572590
direction = "send",
573591
message = mock_device:generate_test_message("hepaFilter", capabilities.filterStatus.filterStatus.replace())
574592
},
593+
},
594+
{
595+
min_api_version = 19
575596
}
576597
)
577598

@@ -630,6 +651,9 @@ test.register_message_test(
630651
direction = "send",
631652
message = mock_device:generate_test_message("activatedCarbonFilter", capabilities.filterStatus.filterStatus.replace())
632653
},
654+
},
655+
{
656+
min_api_version = 19
633657
}
634658
)
635659

@@ -640,7 +664,10 @@ test.register_coroutine_test(
640664
mock_device_onoff:expect_metadata_update({ profile = "extractor-hood-wind-light" })
641665
mock_device_onoff:expect_metadata_update({ provisioning_state = "PROVISIONED" })
642666
end,
643-
{ test_init = test_init_onoff }
667+
{
668+
test_init = test_init_onoff,
669+
min_api_version = 19
670+
}
644671
)
645672

646673
test.register_coroutine_test(
@@ -663,7 +690,10 @@ test.register_coroutine_test(
663690
clusters.OnOff.server.commands.Off(mock_device_onoff, 2)
664691
})
665692
end,
666-
{ test_init = test_init_onoff }
693+
{
694+
test_init = test_init_onoff,
695+
min_api_version = 19
696+
}
667697
)
668698

669699
test.register_coroutine_test(
@@ -684,7 +714,10 @@ test.register_coroutine_test(
684714
mock_device_onoff:generate_test_message("light", capabilities.switch.switch.off())
685715
)
686716
end,
687-
{ test_init = test_init_onoff }
717+
{
718+
test_init = test_init_onoff,
719+
min_api_version = 19
720+
}
688721
)
689722

690723
test.run_registered_tests()

0 commit comments

Comments
 (0)