Skip to content

Set up complete CI quality pipeline and app scaffold#4

Closed
WilcoLouwerse wants to merge 15 commits into
mainfrom
development
Closed

Set up complete CI quality pipeline and app scaffold#4
WilcoLouwerse wants to merge 15 commits into
mainfrom
development

Conversation

@WilcoLouwerse
Copy link
Copy Markdown
Collaborator

@WilcoLouwerse WilcoLouwerse commented Mar 23, 2026

Summary

  • Add appspec/ and openspec/ scaffold directories with README templates,
    feature specs, ADR structure, and roadmap for spec-driven development
  • Enable phpmetrics, phpunit, and newman in CI; add PHPUnit config files
    (phpunit.xml, phpunit-unit.xml), bootstrap files, and a placeholder unit test
  • Add Newman integration test collection with health-check request; fix variable
    names (base_url, admin_user, admin_password) to match CI workflow expectations
  • Add composer.lock and package-lock.json to ensure reproducible installs in CI;
    resolve npm peer dependency conflicts (TypeScript ESLint 7.x, vue-eslint-parser hoisting)
  • Fix code quality issues: PHPCS comment style violations in Application.php,
    PHPMD UnusedFormalParameter suppression for register() interface stub
  • Add pull-request-lint-check.yaml workflow to satisfy org branch protection ruleset

Checks

  • ✅ All local checks passed (lint, phpcs, phpmd, psalm, phpstan, phpmetrics,
    eslint, stylelint, composer audit, npm audit, PHPUnit 1/1, Newman 1/1)

Test plan

  • CI passes
  • Tested locally
  • Reviewed for regressions

- Replace @typescript-eslint/eslint-plugin@^8.x with ^7.18.0 to satisfy
  peer dependency chain from @nextcloud/eslint-config via @vue/eslint-config-typescript
- Add @typescript-eslint/parser@^7.18.0 and eslint-plugin-vue@^9.21.1 explicitly
  so transitive peer deps are hoisted to top-level node_modules (required by ESLint v8)
- Add vue-eslint-parser@^9.4.3 explicitly to ensure it is hoisted and discoverable
- Add stylelint.config.js to prevent stylelint picking up parent-directory config
- Regenerate package-lock.json with correct dependency resolution
CI requires phpunit.xml or phpunit-unit.xml when enable-phpunit is true.
Adds both config files, bootstrap files, and a placeholder unit test.
Provides a starting structure for API integration tests.
Enable in CI by setting enable-newman: true in code-quality.yml.
The register() method is part of the IBootstrap interface contract.
Like boot(), its $context parameter is intentionally unused in the
template since it serves as a placeholder for app-specific registrations.
All three can now be tested locally:
- phpmetrics: runs via composer phpmetrics locally
- phpunit: runs via docker exec against the Nextcloud container
  (XDEBUG_MODE=coverage to avoid runner warning / non-zero exit)
- newman: runs via npx newman against http://nextcloud.local
…in_password)

CI workflow passes base_url/admin_user/admin_password but the collection
used baseUrl/username/password. Mismatched names caused Newman to silently
fall back to the collection default of http://localhost (port 80), which
nothing answers in CI — resulting in ECONNREFUSED.

Also updates default base_url to http://localhost:8080 to match the PHP
built-in server CI starts for Newman tests.
…fold

Add appspec/openspec scaffold, dev tooling, and CI-ready test infrastructure
@github-actions
Copy link
Copy Markdown
Contributor

Quality Report

Repository ConductionNL/nextcloud-app-template
Commit 0b0d42f
Branch 4/merge
Event pull_request
Generated 2026-03-23 09:34 UTC
Workflow Run https://github.com/ConductionNL/nextcloud-app-template/actions/runs/23430519597

Summary

Group Result
PHP Quality PASS
Vue Quality PASS
Security PASS
License PASS
PHPUnit PASS
Newman PASS

PHP Quality

Tool Result
lint PASS
phpcs PASS
phpmd PASS
psalm PASS
phpstan PASS
phpmetrics PASS

Vue Quality

Tool Result
eslint PASS
stylelint PASS

Security

Ecosystem Result
composer PASS
npm PASS

License Compliance

Ecosystem Result
composer PASS
npm PASS

composer dependencies (100 total)

Metric Count
Approved (allowlist) 100
Approved (override) 0
Denied 0

npm dependencies (215 total)

Metric Count
Approved (allowlist) 215
Approved (override) 0
Denied 0

PHPUnit Tests

PHP Nextcloud Result
Overall PASS

Code coverage: 0% (0 / 2 statements)

Integration Tests (Newman)

Result
PASS

Generated automatically by the Quality workflow.

Download the full PDF report from the workflow artifacts.

@WilcoLouwerse
Copy link
Copy Markdown
Collaborator Author

Closing — incorrect target branch (development must target beta, not main). Re-opening with correct target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant