Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/west-zap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright (c) 2025 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: West ZAP Tests

on:
pull_request:
paths:
- 'scripts/west/**'

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

jobs:
zap_tests:
name: west zap tests
runs-on: ubuntu-latest

container:
image: ghcr.io/project-chip/chip-build-nrf-platform:174

steps:
- name: Checkout
uses: actions/checkout@v5
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: nrfconnect
- name: Prepare environment
run: bash -c "source /opt/NordicSemiconductor/nrfconnect/zephyr/zephyr-env.sh && python3 -m pip install wget python-path"
- name: Run ZAP tests
run: bash -c "source /opt/NordicSemiconductor/nrfconnect/zephyr/zephyr-env.sh && python3 scripts/west/tests/zap_tests.py"
41 changes: 41 additions & 0 deletions scripts/west/tests/Cluster1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configurator>
<cluster>
<domain>General</domain>
<name>Cluster 1</name>
<code>0xfff1fc01</code>
<define>CLUSTER_1</define>
<description>Cluster1</description>
<command source="client" code="0xfff10000" name="Command1" optional="false">
<description>Command desc</description>
<arg name="Action" type="Enum1" optional="false"/>
</command>
<attribute side="server" code="0xfff10000" define="ATTR_1" type="Enum1" writable="true" optional="false" name="attr1"/>
<attribute side="server" code="0xfff10001" define="ATTR_2" type="Struct1" writable="true" optional="false" name="attr2"/>
<event side="server" code="0xfff10000" name="UserButtonChanged" priority="info" optional="false">
<description>Event desc.</description>
</event>
</cluster>
<enum name="Enum1" type="int8u">
<cluster code="0xfff1fc01"/>
<item name="Off" value="0"/>
<item name="On" value="1"/>
<item name="Toggle" value="2"/>
</enum>
<struct name="Struct1" isFabricScoped="true">
<cluster code="0xfff1fc01"/>
<item fieldId="1" name="Data" type="octet_string" length="128" isFabricSensitive="true"/>
</struct>
<deviceType>
<name>new-device</name>
<domain>CHIP</domain>
<typeName>NewDevice</typeName>
<profileId editable="false">0x10402</profileId>
<deviceId editable="false">0xfff10001</deviceId>
<class>Simple</class>
<scope>Endpoint</scope>
<clusters lockOthers="true">
<include cluster="Cluster1" client="false" server="true" clientLocked="false" serverLocked="false"/>
</clusters>
</deviceType>
</configurator>
25 changes: 25 additions & 0 deletions scripts/west/tests/Cluster2.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configurator>
<cluster>
<domain>General</domain>
<name>Cluster 2</name>
<code>0xfff1fc02</code>
<define>CLUSTER_2</define>
<description>Cluster1</description>
<command source="client" code="0xfff10000" name="Command2" optional="false">
<description>Command desc</description>
<arg name="Action" type="Enum1" optional="false"/>
</command>
<attribute side="server" code="0xfff10000" define="ATTR_2" type="Enum2" writable="true" optional="false" name="attr2"/>
</cluster>
<enum name="Enum2" type="int8u">
<cluster code="0xfff1fc02"/>
<item name="Off" value="0"/>
<item name="On" value="1"/>
<item name="Toggle" value="2"/>
</enum>
<struct name="Struct2" isFabricScoped="true">
<cluster code="0xfff1fc02"/>
<item fieldId="1" name="Data" type="octet_string" length="128" isFabricSensitive="true"/>
</struct>
</configurator>
Loading
Loading