create-adapter icon indicating copy to clipboard operation
create-adapter copied to clipboard

Run actual adapter integration tests in GitHub Actions CI

Open Copilot opened this issue 4 months ago • 0 comments

Closes #XXX (related to https://github.com/ioBroker/testing/issues/421)

What Changed

Enhanced .github/create_templates.ts to execute the actual test scripts of generated adapter templates during CI runs, not just lint and type-check them.

Why This Matters

Previously, the CI only validated that generated templates were syntactically correct (linting) and type-safe (type checking). However, it didn't verify that:

  • The generated package files are valid
  • The adapters can actually start up
  • Integration tests pass

This left room for accidentally breaking the templates in ways that would only be discovered by users after they generated a new adapter.

What Gets Tested Now

For each generated adapter template, the CI now:

  1. Builds the adapter (for TypeScript and React templates)
  2. Runs test:package - Validates package.json and io-package.json structure and content
  3. Runs test:integration - Starts the adapter in a real ioBroker test environment and verifies it initializes correctly

These are the same tests that generated adapters would run in their own CI pipelines, ensuring we catch breaking changes before they reach users.

Implementation Details

  • Only adapter templates are tested (VIS-only templates are skipped as they don't have adapter tests)
  • Build step is automatically run for TypeScript adapters and React UI adapters before testing
  • Proper error handling with descriptive messages if any test fails
  • All existing tests continue to pass

This ensures generated adapters are not only syntactically correct but functionally working out of the box.

Original prompt

This section details on the original issue you should resolve

<issue_title>Run actual adapter integration tests on GitHub</issue_title> <issue_description>To avoid accidentally breaking the created adapters.

Needs: https://github.com/ioBroker/testing/issues/421</issue_description>

<agent_instructions>The actual CI already uses .github/create_templates.ts to generate ready templates and also test and lint them. Enhance this to also execute the test scripts of the generated adapters to validate that the package and integration tests run.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes ioBroker/create-adapter#779


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar Oct 14 '25 07:10 Copilot