Skip to content

GHA: Check for category existence on the main component - #3136

Merged
hcarter-775 merged 2 commits into
mainfrom
add/category-existence-check
Jul 27, 2026
Merged

GHA: Check for category existence on the main component#3136
hcarter-775 merged 2 commits into
mainfrom
add/category-existence-check

Conversation

@hcarter-775

@hcarter-775 hcarter-775 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Description of Change

Ensure that a category exists on the main component. Follow up to missing category issue found recently.

Testing Completed

See the following issue when a missing category is applied:

CHECKING PROFILE:
drivers/SmartThings/matter-window-covering/profiles/door.yml
MISSING CATEGORY: drivers/SmartThings/matter-window-covering/profiles/door.yml

Profile category check: :x: **Missing categories detected.**

The following profiles are missing a `categories` field on the `main` component:

- `drivers/SmartThings/matter-window-covering/profiles/door.yml`

Please add a `categories` entry to the `main` component. Example:
```yaml
components:
  - id: main
    categories:
      - name: Switch
    capabilities:
      ...

Duplicate profile checking still functions:

Duplicate profile check: Warning - duplicate profiles detected.
2-button-battery-copy.yml == 2-button-battery.yml

@hcarter-775 hcarter-775 added the CGAI Contains code that was generated by AI label Jul 22, 2026
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

Duplicate profile check: Warning - duplicate profiles detected.
2-button-battery-copy.yml == 2-button-battery.yml

@github-actions

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

Test Results

   73 files    540 suites   0s ⏱️
3 241 tests 3 241 ✅ 0 💤 0 ❌
5 233 runs  5 233 ✅ 0 💤 0 ❌

Results for commit 84e1a52.

♻️ This comment has been updated with latest results.

@github-actions

Copy link
Copy Markdown

File Coverage
All files 86%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/closure/closure_utils/embedded_cluster_utils.lua 43%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/closure/closure_utils/utils.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/closure/closure_handlers/attribute_handlers.lua 86%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/closure/closure_handlers/capability_handlers.lua 73%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/matter-window-covering-position-updates-while-moving/can_handle.lua 70%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/lazy_load_subdriver.lua 57%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/init.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-window-covering/src/sub_drivers/closure/init.lua 78%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 761f223

@hcarter-775
hcarter-775 force-pushed the add/category-existence-check branch 2 times, most recently from 286769e to 9f3bc43 Compare July 22, 2026 18:24
# Creates file "~/files.csv", among others
- id: file_changes
name: Gather file changes
uses: trilom/file-changes-action@1.2.4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this isnt really being maintained anymore. Maybe replace with tj-actions/changed-files. IMO it would be even better to have the script use git to determine the changed files, which allows it to run locally easier.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this is the same thing used in duplicate-profile.yml. Not necessarily saying we shouldn't change it

@hcarter-775 hcarter-775 Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Scripts needed to be updated to alter their handling from the .csv reading to the environment variable pull. Re-tested with the new logic.

@hcarter-775
hcarter-775 force-pushed the add/category-existence-check branch 2 times, most recently from 7f01d0d to 6b4d7dd Compare July 27, 2026 18:07
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

matter-switch_coverage.xml

File Coverage
All files 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_garage_door/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_utils/event_utils.lua 52%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 94%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 98%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 90%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/hager/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/scroll_handlers/event_handlers.lua 75%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/init.lua 93%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/attribute_handlers.lua 80%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/event_handlers.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 83%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 95%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against 84e1a52


- name: Run python script
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth a check that this still detects duplicate profiles

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it is still working as it did before:

Duplicate profile check: Warning - duplicate profiles detected.
2-button-battery-copy.yml == 2-button-battery.yml

@hcarter-775
hcarter-775 force-pushed the add/category-existence-check branch from 84e1a52 to 6b4d7dd Compare July 27, 2026 18:52
@hcarter-775
hcarter-775 merged commit 010ab9a into main Jul 27, 2026
2 checks passed
@hcarter-775
hcarter-775 deleted the add/category-existence-check branch July 27, 2026 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CGAI Contains code that was generated by AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants