Skip to content

ChipToolIntegrationTests #69

ChipToolIntegrationTests

ChipToolIntegrationTests #69

---
name: ChipToolIntegrationTests
on:
schedule:
# Run every night at 2:00 AM UTC
- cron: "0 2 * * *"
workflow_dispatch:
inputs:
chip_ref:
description: 'Chip repository reference (branch/tag/commit)'
required: false
# default: 'master'
default: 'v1.3.0.0'
type: string
env:
RUST_TOOLCHAIN: stable
CARGO_TERM_COLOR: always
jobs:
yaml_integration_tests:
# Downgrade to 22.04 so that Matter 1.3's `activate.sh` does not fail with "ModuleNotFoundError: No module named 'imp'"
# runs-on: ubuntu-latest
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- name: Checkout rs-matter
uses: actions/checkout@v4
- name: Install libdbus
run: sudo apt-get install -y libdbus-1-dev
- name: Build xtask
run: |
cd xtask; cargo build
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install `./xtask/target/debug/xtask -v s itest-packages`
- name: Fix unshare permissions
run: |
sudo sysctl kernel.apparmor_restrict_unprivileged_userns=0
- name: Cache Chip build
uses: actions/cache@v4
with:
path: .build/itest/connectedhomeip
key: >-
chip-${{ runner.os }}-${{
hashFiles('.build/itest/connectedhomeip/**/*.py',
'.build/itest/connectedhomeip/**/*.sh', '.build/itest/connectedhomeip/**/BUILD.gn') }}
- name: Setup Chip environment
run: |
cargo xtask itest-setup --gitref "${{ inputs.chip_ref || 'v1.3.0.0' }}"
- name: Run YAML Integration Tests
run: |
cargo xtask itest
- name: Run LevelControl and OnOff YAML Integration Tests for dimmable_light
run: |
cargo xtask itest --target dimmable_light --timeout 500 --features chip-test Test_TC_LVL_1_1 Test_TC_LVL_2_1 Test_TC_LVL_2_2 Test_TC_LVL_3_1 Test_TC_LVL_4_1 Test_TC_LVL_5_1 Test_TC_LVL_6_1 Test_TC_OO_1_1 Test_TC_OO_2_1 Test_TC_OO_2_2 Test_TC_OO_2_3 Test_TC_OO_2_4
- name: Upload test results on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ github.run_id }}
path: |
/tmp/rs-matter*/
.build/itest/connectedhomeip/out/host/chip-tool.log
retention-days: 7