Skip to content

Commit daaa5df

Browse files
committed
[#1192] Added drevops/vortex-tooling codebase.
1 parent adf5df0 commit daaa5df

36 files changed

+5288
-11
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# This action is used for Vortex maintenance. It will not be used in the scaffolded project.
2+
name: Vortex - Test tooling
3+
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
pull_request:
9+
branches:
10+
- develop
11+
- 'feature/**'
12+
- 'bugfix/**'
13+
14+
jobs:
15+
vortex-test-tooling:
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
php-versions: ['8.3', '8.4', '8.5']
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
25+
26+
- name: Setup PHP
27+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2
28+
with:
29+
php-version: ${{ matrix.php-versions }}
30+
coverage: pcov
31+
ini-values: pcov.directory=.
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
35+
with:
36+
node-version: 22.17.1
37+
38+
- name: Set default branch name
39+
run: git config --global init.defaultBranch >/dev/null || git config --global init.defaultBranch "main"
40+
41+
- name: Install dependencies
42+
run: composer install
43+
working-directory: .vortex/tooling
44+
45+
- name: Validate Composer configuration is normalized
46+
run: composer normalize --dry-run
47+
working-directory: .vortex/tooling
48+
49+
- name: Check coding standards
50+
run: composer lint
51+
working-directory: .vortex/tooling
52+
53+
- name: Run tests
54+
run: composer test-coverage
55+
working-directory: .vortex/tooling
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
58+
59+
- name: Upload coverage reports as an artifact
60+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
61+
with:
62+
name: ${{github.job}}-code-coverage-report-${{ matrix.php-versions }}
63+
path: .vortex/tooling/.logs
64+
include-hidden-files: true
65+
if-no-files-found: error
66+
67+
- name: Upload coverage report to Codecov
68+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5
69+
with:
70+
files: .vortex/tooling/.logs/cobertura.xml
71+
fail_ci_if_error: true
72+
token: ${{ secrets.CODECOV_TOKEN }}

.vortex/CLAUDE.md

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ vortex/
1515
├── .vortex/ # Test harness and development tools
1616
│ ├── docs/ # Documentation for Vortex
1717
│ ├── installer/ # Self-contained Symfony console installer
18+
│ ├── tooling/ # PHP helpers and notification scripts
19+
│ │ └── CLAUDE.md # Tooling documentation (see this for tooling work)
1820
│ ├── tests/ # Unit and functional tests
19-
│ └── CLAUDE.md # This maintenance guide
21+
│ └── CLAUDE.md # This maintenance guide
2022
└── [root files] # The actual Drupal template
2123
└── CLAUDE.md # Drupal development guide
2224
```
@@ -25,7 +27,7 @@ vortex/
2527

2628
## .vortex Directory Structure
2729

28-
The `.vortex/` directory contains **three distinct subsystems**, each with its own purpose and technology stack:
30+
The `.vortex/` directory contains **four distinct subsystems**, each with its own purpose and technology stack:
2931

3032
### 1. .vortex/docs/ - Documentation Website
3133

@@ -87,7 +89,22 @@ composer install # Install dependencies
8789
UPDATE_FIXTURES=1 composer test # Update test fixtures
8890
```
8991

90-
### 3. .vortex/tests/ - Template Testing Harness
92+
### 3. .vortex/tooling/ - Notification & Helper Scripts
93+
94+
**Purpose**: Reusable PHP helper functions and notification scripts for Vortex operations
95+
96+
> **⚠️ ALL TOOLING DOCUMENTATION IS IN `.vortex/tooling/CLAUDE.md`**
97+
>
98+
> For ANY work related to:
99+
>
100+
> - PHP helper functions (request_get, request_post, output formatters, etc.)
101+
> - Notification scripts (notify-github, notify-jira, notify-slack, etc.)
102+
> - Mock system (MockTrait, Self tests)
103+
> - Tooling tests
104+
>
105+
> **→ See `.vortex/tooling/CLAUDE.md` for complete documentation**
106+
107+
### 4. .vortex/tests/ - Template Testing Harness
91108

92109
**Purpose**: Comprehensive testing of the Vortex template itself through functional workflows
93110

@@ -121,7 +138,7 @@ cd tests && ./vendor/bin/phpunit # Run PHPUnit workflow tests
121138

122139
## Testing Architecture Overview
123140

124-
Vortex uses **four independent testing systems**, each serving different parts of the codebase:
141+
Vortex uses **five independent testing systems**, each serving different parts of the codebase:
125142

126143
### 1. Documentation Tests (.vortex/docs/)
127144

@@ -161,7 +178,11 @@ Vortex uses **four independent testing systems**, each serving different parts o
161178
- **Handler tests**: Individual prompt and modification logic
162179
- **Fixture tests**: Expected vs actual template output
163180

164-
### 3. Template Tests (.vortex/tests/)
181+
### 3. Tooling Tests (.vortex/tooling/)
182+
183+
> **→ See `.vortex/tooling/CLAUDE.md`** for all tooling test documentation
184+
185+
### 4. Template Tests (.vortex/tests/)
165186

166187
**Scope**: Testing the actual Drupal template functionality
167188

@@ -179,7 +200,7 @@ Vortex uses **four independent testing systems**, each serving different parts o
179200
- **PHPUnit Functional**: End-to-end workflow testing
180201
- **BATS Unit**: Individual shell script testing with mocking
181202

182-
### 4. Manual Integration Tests (.vortex/tests/manual/)
203+
### 5. Manual Integration Tests (.vortex/tests/manual/)
183204

184205
**Scope**: Manual verification of notification integrations with real external services
185206

@@ -545,12 +566,13 @@ When script output changes, update corresponding test files:
545566

546567
1. **Documentation** (`.vortex/docs/`): Requires Node.js/Yarn
547568
2. **Installer** (`.vortex/installer/`): Requires PHP/Composer
548-
3. **Template** (`.vortex/tests/`): Requires PHP/Composer + Node.js + BATS
569+
3. **Tooling** (`.vortex/tooling/`): Requires PHP/Composer
570+
4. **Template** (`.vortex/tests/`): Requires PHP/Composer + Node.js + BATS
549571

550572
**Full Setup** (from `.vortex/`):
551573

552574
```bash
553-
ahoy install # Installs dependencies for all three systems
575+
ahoy install # Installs dependencies for all four systems
554576
```
555577

556578
## Unified Testing Commands
@@ -559,13 +581,14 @@ For convenience, you can run tests across all systems:
559581

560582
```bash
561583
# From .vortex/ root
562-
ahoy install # Install all dependencies (docs, installer, template)
584+
ahoy install # Install all dependencies (docs, installer, tooling, template)
563585
ahoy lint # Code linting across all systems
564586
ahoy test # Run all template tests
565587

566588
# Individual system commands
567589
cd docs && yarn test # Documentation tests only
568590
cd installer && composer test # Installer tests only
591+
cd tooling && ./vendor/bin/phpunit # Tooling tests only
569592
cd tests && ./vendor/bin/phpunit # Template PHPUnit tests only
570593
ahoy test-bats -- tests/bats/ # Template BATS tests only
571594
```
@@ -1581,10 +1604,10 @@ throw new \RuntimeException(sprintf(
15811604
### Cross-System Considerations
15821605
15831606
- Each system can be modified independently
1584-
- Changes to template (outside `.vortex/`) may require updates across all three systems
1607+
- Changes to template (outside `.vortex/`) may require updates across all four systems
15851608
- Always run system-specific tests after making changes
15861609
- Consider impact on user workflows when modifying any system
15871610
15881611
---
15891612
1590-
*This knowledge base should be updated whenever significant changes are made to any of the three Vortex subsystems or their maintenance procedures.*
1613+
*This knowledge base should be updated whenever significant changes are made to any of the four Vortex subsystems or their maintenance procedures.*

.vortex/tooling/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
vendor
2+
composer.lock
3+
.logs

0 commit comments

Comments
 (0)