moai-adk 0.10.1__py3-none-any.whl → 0.11.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of moai-adk might be problematic. Click here for more details.

Files changed (58) hide show
  1. moai_adk/core/issue_creator.py +2 -2
  2. moai_adk/core/project/detector.py +285 -12
  3. moai_adk/core/project/phase_executor.py +4 -0
  4. moai_adk/core/tags/ci_validator.py +33 -3
  5. moai_adk/core/template_engine.py +6 -2
  6. moai_adk/templates/.claude/commands/alfred/0-project.md +60 -62
  7. moai_adk/templates/.claude/commands/alfred/1-plan.md +6 -0
  8. moai_adk/templates/.claude/commands/alfred/2-run.md +6 -0
  9. moai_adk/templates/.claude/commands/alfred/3-sync.md +6 -0
  10. moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +8 -9
  11. moai_adk/templates/.claude/hooks/alfred/core/project.py +22 -28
  12. moai_adk/templates/.claude/hooks/alfred/core/timeout.py +136 -0
  13. moai_adk/templates/.claude/hooks/alfred/core/ttl_cache.py +109 -0
  14. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +4 -4
  15. moai_adk/templates/.claude/hooks/alfred/notification__handle_events.py +10 -15
  16. moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +10 -15
  17. moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +10 -15
  18. moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +10 -15
  19. moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +10 -15
  20. moai_adk/templates/.claude/hooks/alfred/shared/core/__init__.py +2 -2
  21. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +19 -26
  22. moai_adk/templates/.claude/hooks/alfred/shared/core/tags.py +55 -23
  23. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +4 -4
  24. moai_adk/templates/.claude/hooks/alfred/shared/handlers/notification.py +134 -3
  25. moai_adk/templates/.claude/hooks/alfred/shared/handlers/session.py +9 -10
  26. moai_adk/templates/.claude/hooks/alfred/shared/handlers/tool.py +3 -6
  27. moai_adk/templates/.claude/hooks/alfred/stop__handle_interrupt.py +10 -15
  28. moai_adk/templates/.claude/hooks/alfred/subagent_stop__handle_subagent_end.py +10 -15
  29. moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +11 -20
  30. moai_adk/templates/.claude/hooks/alfred/utils/__init__.py +1 -0
  31. moai_adk/templates/.claude/hooks/alfred/utils/timeout.py +136 -0
  32. moai_adk/templates/.github/workflows/c-tag-validation.yml +83 -0
  33. moai_adk/templates/.github/workflows/cpp-tag-validation.yml +79 -0
  34. moai_adk/templates/.github/workflows/csharp-tag-validation.yml +65 -0
  35. moai_adk/templates/.github/workflows/dart-tag-validation.yml +82 -0
  36. moai_adk/templates/.github/workflows/java-tag-validation.yml +75 -0
  37. moai_adk/templates/.github/workflows/kotlin-tag-validation.yml +67 -0
  38. moai_adk/templates/.github/workflows/{release.yml → moai-adk-release.yml} +6 -2
  39. moai_adk/templates/.github/workflows/{tag-validation.yml → moai-adk-tag-validation.yml} +53 -8
  40. moai_adk/templates/.github/workflows/moai-gitflow.yml +6 -1
  41. moai_adk/templates/.github/workflows/php-tag-validation.yml +56 -0
  42. moai_adk/templates/.github/workflows/ruby-tag-validation.yml +68 -0
  43. moai_adk/templates/.github/workflows/rust-tag-validation.yml +73 -0
  44. moai_adk/templates/.github/workflows/shell-tag-validation.yml +65 -0
  45. moai_adk/templates/.github/workflows/swift-tag-validation.yml +79 -0
  46. moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md +330 -0
  47. moai_adk/templates/.moai/memory/SPEC-METADATA.md +356 -0
  48. moai_adk/templates/CLAUDE.md +536 -65
  49. moai_adk/templates/workflows/go-tag-validation.yml +130 -0
  50. moai_adk/templates/workflows/javascript-tag-validation.yml +135 -0
  51. moai_adk/templates/workflows/python-tag-validation.yml +118 -0
  52. moai_adk/templates/workflows/typescript-tag-validation.yml +154 -0
  53. {moai_adk-0.10.1.dist-info → moai_adk-0.11.1.dist-info}/METADATA +70 -13
  54. {moai_adk-0.10.1.dist-info → moai_adk-0.11.1.dist-info}/RECORD +58 -37
  55. /moai_adk/templates/.github/workflows/{spec-issue-sync.yml → moai-adk-spec-issue-sync.yml} +0 -0
  56. {moai_adk-0.10.1.dist-info → moai_adk-0.11.1.dist-info}/WHEEL +0 -0
  57. {moai_adk-0.10.1.dist-info → moai_adk-0.11.1.dist-info}/entry_points.txt +0 -0
  58. {moai_adk-0.10.1.dist-info → moai_adk-0.11.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,83 @@
1
+ # @CODE:LDE-009-C | SPEC: SPEC-LANGUAGE-DETECTION-EXTENDED-001/spec.md
2
+ # C TAG Validation Workflow
3
+ # Validates C code with gcc/clang, cppcheck, and Unity/ctest
4
+
5
+ name: C TAG Validation
6
+
7
+ on:
8
+ pull_request:
9
+ types: [opened, synchronize, reopened, ready_for_review]
10
+ push:
11
+ branches: [main, develop, "feature/**"]
12
+
13
+ jobs:
14
+ test:
15
+ name: 🧪 C Tests & Static Analysis
16
+ runs-on: ubuntu-latest
17
+
18
+ if: github.event.pull_request.draft == false || github.event_name == 'push'
19
+
20
+ permissions:
21
+ contents: read
22
+ pull-requests: write
23
+
24
+ strategy:
25
+ matrix:
26
+ compiler: ['gcc', 'clang']
27
+
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 0
33
+
34
+ - name: Install build tools
35
+ run: |
36
+ sudo apt-get update
37
+ sudo apt-get install -y cmake gcc clang cppcheck valgrind
38
+
39
+ - name: Set compiler
40
+ run: |
41
+ if [ "${{ matrix.compiler }}" == "gcc" ]; then
42
+ echo "CC=gcc" >> $GITHUB_ENV
43
+ echo "CXX=g++" >> $GITHUB_ENV
44
+ else
45
+ echo "CC=clang" >> $GITHUB_ENV
46
+ echo "CXX=clang++" >> $GITHUB_ENV
47
+ fi
48
+
49
+ - name: Configure CMake
50
+ run: cmake -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON
51
+
52
+ - name: Build project
53
+ run: cmake --build build --config Debug
54
+
55
+ - name: Run cppcheck static analysis
56
+ run: cppcheck --enable=all --error-exitcode=1 --suppress=missingIncludeSystem src/
57
+
58
+ - name: Run tests with ctest
59
+ run: |
60
+ cd build
61
+ ctest --output-on-failure --verbose
62
+
63
+ - name: Run Valgrind memory check
64
+ if: matrix.compiler == 'gcc'
65
+ run: |
66
+ cd build
67
+ ctest -T memcheck
68
+
69
+ - name: Generate coverage report
70
+ if: matrix.compiler == 'gcc'
71
+ run: |
72
+ cd build
73
+ gcov -r CMakeFiles/**/*.gcno
74
+ lcov --capture --directory . --output-file coverage.info
75
+ lcov --remove coverage.info '/usr/*' --output-file coverage.info
76
+
77
+ - name: Upload coverage artifacts
78
+ if: always() && matrix.compiler == 'gcc'
79
+ uses: actions/upload-artifact@v4
80
+ with:
81
+ name: c-coverage-${{ matrix.compiler }}
82
+ path: build/coverage.info
83
+ retention-days: 30
@@ -0,0 +1,79 @@
1
+ # @CODE:LDE-010-CPP | SPEC: SPEC-LANGUAGE-DETECTION-EXTENDED-001/spec.md
2
+ # C++ TAG Validation Workflow
3
+ # Validates C++ code with g++/clang++, Google Test, and cpplint
4
+
5
+ name: C++ TAG Validation
6
+
7
+ on:
8
+ pull_request:
9
+ types: [opened, synchronize, reopened, ready_for_review]
10
+ push:
11
+ branches: [main, develop, "feature/**"]
12
+
13
+ jobs:
14
+ test:
15
+ name: 🧪 C++ Tests & Static Analysis
16
+ runs-on: ubuntu-latest
17
+
18
+ if: github.event.pull_request.draft == false || github.event_name == 'push'
19
+
20
+ permissions:
21
+ contents: read
22
+ pull-requests: write
23
+
24
+ strategy:
25
+ matrix:
26
+ compiler: ['g++', 'clang++']
27
+ cpp-standard: ['17', '20']
28
+
29
+ steps:
30
+ - name: Checkout code
31
+ uses: actions/checkout@v4
32
+ with:
33
+ fetch-depth: 0
34
+
35
+ - name: Install build tools and Google Test
36
+ run: |
37
+ sudo apt-get update
38
+ sudo apt-get install -y cmake g++ clang libgtest-dev lcov
39
+
40
+ - name: Install cpplint
41
+ run: pip install cpplint
42
+
43
+ - name: Set compiler
44
+ run: |
45
+ if [ "${{ matrix.compiler }}" == "g++" ]; then
46
+ echo "CXX=g++" >> $GITHUB_ENV
47
+ else
48
+ echo "CXX=clang++" >> $GITHUB_ENV
49
+ fi
50
+
51
+ - name: Run cpplint
52
+ run: cpplint --recursive --filter=-legal/copyright src/
53
+
54
+ - name: Configure CMake
55
+ run: cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=${{ matrix.cpp-standard }} -DENABLE_COVERAGE=ON
56
+
57
+ - name: Build project
58
+ run: cmake --build build --config Debug
59
+
60
+ - name: Run Google Test
61
+ run: |
62
+ cd build
63
+ ctest --output-on-failure --verbose
64
+
65
+ - name: Generate coverage report
66
+ if: matrix.compiler == 'g++' && matrix.cpp-standard == '17'
67
+ run: |
68
+ cd build
69
+ lcov --capture --directory . --output-file coverage.info
70
+ lcov --remove coverage.info '/usr/*' '*/test/*' --output-file coverage.info
71
+ lcov --list coverage.info
72
+
73
+ - name: Upload coverage artifacts
74
+ if: always() && matrix.compiler == 'g++' && matrix.cpp-standard == '17'
75
+ uses: actions/upload-artifact@v4
76
+ with:
77
+ name: cpp-coverage-${{ matrix.compiler }}-cpp${{ matrix.cpp-standard }}
78
+ path: build/coverage.info
79
+ retention-days: 30
@@ -0,0 +1,65 @@
1
+ # @CODE:LDE-008-CSHARP | SPEC: SPEC-LANGUAGE-DETECTION-EXTENDED-001/spec.md
2
+ # C# TAG Validation Workflow
3
+ # Validates C# code with xUnit tests, StyleCop linting, and dotnet CLI
4
+
5
+ name: C# TAG Validation
6
+
7
+ on:
8
+ pull_request:
9
+ types: [opened, synchronize, reopened, ready_for_review]
10
+ push:
11
+ branches: [main, develop, "feature/**"]
12
+
13
+ jobs:
14
+ test:
15
+ name: 🧪 C# Tests & Linting
16
+ runs-on: ubuntu-latest
17
+
18
+ if: github.event.pull_request.draft == false || github.event_name == 'push'
19
+
20
+ permissions:
21
+ contents: read
22
+ pull-requests: write
23
+
24
+ strategy:
25
+ matrix:
26
+ dotnet-version: ['8.0.x', '9.0.x']
27
+
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 0
33
+
34
+ - name: Setup .NET
35
+ uses: actions/setup-dotnet@v4
36
+ with:
37
+ dotnet-version: ${{ matrix.dotnet-version }}
38
+
39
+ - name: Restore dependencies
40
+ run: dotnet restore
41
+
42
+ - name: Build project
43
+ run: dotnet build --configuration Release --no-restore
44
+
45
+ - name: Run tests with coverage
46
+ run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage"
47
+
48
+ - name: Run StyleCop analysis
49
+ run: dotnet build --no-restore /p:EnforceCodeStyleInBuild=true /p:TreatWarningsAsErrors=true
50
+
51
+ - name: Upload coverage artifacts
52
+ if: always()
53
+ uses: actions/upload-artifact@v4
54
+ with:
55
+ name: csharp-coverage-${{ matrix.dotnet-version }}
56
+ path: '**/TestResults/**/*.coverage'
57
+ retention-days: 30
58
+
59
+ - name: Publish test results
60
+ if: always()
61
+ uses: actions/upload-artifact@v4
62
+ with:
63
+ name: csharp-test-results-${{ matrix.dotnet-version }}
64
+ path: '**/TestResults/**/*.trx'
65
+ retention-days: 30
@@ -0,0 +1,82 @@
1
+ # @CODE:LDE-005-DART | SPEC: SPEC-LANGUAGE-DETECTION-EXTENDED-001/spec.md
2
+ # Dart/Flutter TAG Validation Workflow
3
+ # Validates Dart code with flutter test, dart analyze, and pub dependencies
4
+
5
+ name: Dart TAG Validation
6
+
7
+ on:
8
+ pull_request:
9
+ types: [opened, synchronize, reopened, ready_for_review]
10
+ push:
11
+ branches: [main, develop, "feature/**"]
12
+
13
+ jobs:
14
+ test:
15
+ name: 🧪 Dart Tests & Analysis
16
+ runs-on: ubuntu-latest
17
+
18
+ if: github.event.pull_request.draft == false || github.event_name == 'push'
19
+
20
+ permissions:
21
+ contents: read
22
+ pull-requests: write
23
+
24
+ strategy:
25
+ matrix:
26
+ dart-version: ['stable', 'beta']
27
+
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 0
33
+
34
+ - name: Check if Flutter project
35
+ id: detect-flutter
36
+ run: |
37
+ if grep -q "flutter:" pubspec.yaml 2>/dev/null; then
38
+ echo "is_flutter=true" >> $GITHUB_OUTPUT
39
+ echo "Flutter project detected"
40
+ else
41
+ echo "is_flutter=false" >> $GITHUB_OUTPUT
42
+ echo "Dart project detected"
43
+ fi
44
+
45
+ - name: Setup Dart (non-Flutter)
46
+ if: steps.detect-flutter.outputs.is_flutter == 'false'
47
+ uses: dart-lang/setup-dart@v1
48
+ with:
49
+ sdk: ${{ matrix.dart-version }}
50
+
51
+ - name: Setup Flutter (Flutter projects)
52
+ if: steps.detect-flutter.outputs.is_flutter == 'true'
53
+ uses: subosito/flutter-action@v2
54
+ with:
55
+ channel: ${{ matrix.dart-version }}
56
+
57
+ - name: Install dependencies (Dart)
58
+ if: steps.detect-flutter.outputs.is_flutter == 'false'
59
+ run: dart pub get
60
+
61
+ - name: Install dependencies (Flutter)
62
+ if: steps.detect-flutter.outputs.is_flutter == 'true'
63
+ run: flutter pub get
64
+
65
+ - name: Run dart analyze
66
+ run: dart analyze --fatal-infos
67
+
68
+ - name: Run tests (Dart)
69
+ if: steps.detect-flutter.outputs.is_flutter == 'false'
70
+ run: dart test
71
+
72
+ - name: Run tests (Flutter)
73
+ if: steps.detect-flutter.outputs.is_flutter == 'true'
74
+ run: flutter test
75
+
76
+ - name: Upload coverage artifacts
77
+ if: always()
78
+ uses: actions/upload-artifact@v4
79
+ with:
80
+ name: dart-coverage-${{ matrix.dart-version }}
81
+ path: coverage/
82
+ retention-days: 30
@@ -0,0 +1,75 @@
1
+ # @CODE:LDE-003-JAVA | SPEC: SPEC-LANGUAGE-DETECTION-EXTENDED-001/spec.md
2
+ # Java TAG Validation Workflow
3
+ # Validates Java code with JUnit 5 tests, Jacoco coverage, and Maven/Gradle builds
4
+
5
+ name: Java TAG Validation
6
+
7
+ on:
8
+ pull_request:
9
+ types: [opened, synchronize, reopened, ready_for_review]
10
+ push:
11
+ branches: [main, develop, "feature/**"]
12
+
13
+ jobs:
14
+ test:
15
+ name: 🧪 Java Tests & Build
16
+ runs-on: ubuntu-latest
17
+
18
+ if: github.event.pull_request.draft == false || github.event_name == 'push'
19
+
20
+ permissions:
21
+ contents: read
22
+ pull-requests: write
23
+
24
+ strategy:
25
+ matrix:
26
+ java-version: ['17', '21']
27
+
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 0
33
+
34
+ - name: Setup Java
35
+ uses: actions/setup-java@v4
36
+ with:
37
+ distribution: 'temurin'
38
+ java-version: ${{ matrix.java-version }}
39
+ cache: 'maven' # Auto-detects Maven or Gradle
40
+
41
+ - name: Detect build tool
42
+ id: detect-build
43
+ run: |
44
+ if [ -f "pom.xml" ]; then
45
+ echo "tool=maven" >> $GITHUB_OUTPUT
46
+ echo "Maven detected"
47
+ elif [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
48
+ echo "tool=gradle" >> $GITHUB_OUTPUT
49
+ echo "Gradle detected"
50
+ else
51
+ echo "No build tool detected"
52
+ exit 1
53
+ fi
54
+
55
+ - name: Build and test with Maven
56
+ if: steps.detect-build.outputs.tool == 'maven'
57
+ run: |
58
+ mvn clean verify
59
+ mvn jacoco:report
60
+
61
+ - name: Build and test with Gradle
62
+ if: steps.detect-build.outputs.tool == 'gradle'
63
+ run: |
64
+ chmod +x gradlew
65
+ ./gradlew clean test jacocoTestReport
66
+
67
+ - name: Upload coverage artifacts
68
+ if: always()
69
+ uses: actions/upload-artifact@v4
70
+ with:
71
+ name: java-coverage-${{ matrix.java-version }}
72
+ path: |
73
+ target/site/jacoco/
74
+ build/reports/jacoco/
75
+ retention-days: 30
@@ -0,0 +1,67 @@
1
+ # @CODE:LDE-007-KOTLIN | SPEC: SPEC-LANGUAGE-DETECTION-EXTENDED-001/spec.md
2
+ # Kotlin TAG Validation Workflow
3
+ # Validates Kotlin code with JUnit 5 tests, ktlint, and Gradle
4
+
5
+ name: Kotlin TAG Validation
6
+
7
+ on:
8
+ pull_request:
9
+ types: [opened, synchronize, reopened, ready_for_review]
10
+ push:
11
+ branches: [main, develop, "feature/**"]
12
+
13
+ jobs:
14
+ test:
15
+ name: 🧪 Kotlin Tests & Linting
16
+ runs-on: ubuntu-latest
17
+
18
+ if: github.event.pull_request.draft == false || github.event_name == 'push'
19
+
20
+ permissions:
21
+ contents: read
22
+ pull-requests: write
23
+
24
+ strategy:
25
+ matrix:
26
+ java-version: ['17', '21']
27
+
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 0
33
+
34
+ - name: Setup Java (for Kotlin)
35
+ uses: actions/setup-java@v4
36
+ with:
37
+ distribution: 'temurin'
38
+ java-version: ${{ matrix.java-version }}
39
+ cache: 'gradle'
40
+
41
+ - name: Grant execute permission for gradlew
42
+ run: chmod +x gradlew
43
+
44
+ - name: Run ktlint check
45
+ run: ./gradlew ktlintCheck
46
+
47
+ - name: Build project
48
+ run: ./gradlew build
49
+
50
+ - name: Run tests with coverage
51
+ run: ./gradlew test jacocoTestReport
52
+
53
+ - name: Upload coverage artifacts
54
+ if: always()
55
+ uses: actions/upload-artifact@v4
56
+ with:
57
+ name: kotlin-coverage-java${{ matrix.java-version }}
58
+ path: build/reports/jacoco/
59
+ retention-days: 30
60
+
61
+ - name: Publish test results
62
+ if: always()
63
+ uses: actions/upload-artifact@v4
64
+ with:
65
+ name: kotlin-test-results-java${{ matrix.java-version }}
66
+ path: build/test-results/
67
+ retention-days: 30
@@ -10,14 +10,18 @@ jobs:
10
10
  name: 📦 Deploy to PyPI
11
11
  runs-on: ubuntu-latest
12
12
 
13
+ strategy:
14
+ matrix:
15
+ python-version: ["3.11", "3.12", "3.13"]
16
+
13
17
  steps:
14
18
  - name: 📥 Checkout code
15
19
  uses: actions/checkout@v4
16
20
 
17
- - name: 🐍 Setup Python 3.13
21
+ - name: 🐍 Setup Python ${{ matrix.python-version }}
18
22
  uses: actions/setup-python@v5
19
23
  with:
20
- python-version: "3.13"
24
+ python-version: ${{ matrix.python-version }}
21
25
 
22
26
  - name: 📦 Install uv
23
27
  uses: astral-sh/setup-uv@v2
@@ -10,9 +10,39 @@ on:
10
10
  branches: [main, develop, "feature/**"]
11
11
 
12
12
  jobs:
13
+ detect-language:
14
+ name: 🔍 Detect Project Language
15
+ runs-on: ubuntu-latest
16
+ outputs:
17
+ language: ${{ steps.detect.outputs.language }}
18
+ is-python: ${{ steps.detect.outputs.is-python }}
19
+ is-javascript: ${{ steps.detect.outputs.is-javascript }}
20
+
21
+ steps:
22
+ - name: Checkout code
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Detect language
26
+ id: detect
27
+ run: |
28
+ if [ -f "pyproject.toml" ] || [ -f "setup.py" ] || [ -f "requirements.txt" ]; then
29
+ echo "language=python" >> $GITHUB_OUTPUT
30
+ echo "is-python=true" >> $GITHUB_OUTPUT
31
+ echo "is-javascript=false" >> $GITHUB_OUTPUT
32
+ elif [ -f "package.json" ]; then
33
+ echo "language=javascript" >> $GITHUB_OUTPUT
34
+ echo "is-python=false" >> $GITHUB_OUTPUT
35
+ echo "is-javascript=true" >> $GITHUB_OUTPUT
36
+ else
37
+ echo "language=unknown" >> $GITHUB_OUTPUT
38
+ echo "is-python=false" >> $GITHUB_OUTPUT
39
+ echo "is-javascript=false" >> $GITHUB_OUTPUT
40
+ fi
41
+
13
42
  validate-tags:
14
43
  name: 🏷️ Validate TAG Annotations
15
44
  runs-on: ubuntu-latest
45
+ needs: detect-language
16
46
 
17
47
  # Skip validation on draft PRs (allow WIP)
18
48
  if: github.event.pull_request.draft == false || github.event_name == 'push'
@@ -21,26 +51,41 @@ jobs:
21
51
  contents: read
22
52
  pull-requests: write
23
53
 
54
+ strategy:
55
+ matrix:
56
+ python-version: ["3.11", "3.12", "3.13"]
57
+ node-version: ["18", "20"]
58
+
24
59
  steps:
25
60
  - name: Checkout code
26
61
  uses: actions/checkout@v4
27
62
  with:
28
63
  fetch-depth: 0 # Fetch all history for comprehensive validation
29
64
 
30
- - name: Setup Python
65
+ - name: Setup Python (if Python project)
66
+ if: needs.detect-language.outputs.is-python == 'true'
31
67
  uses: actions/setup-python@v5
32
68
  with:
33
- python-version: '3.13'
69
+ python-version: ${{ matrix.python-version }}
34
70
 
35
- - name: Install uv
36
- uses: astral-sh/setup-uv@v5
71
+ - name: Setup Node.js (if JavaScript project)
72
+ if: needs.detect-language.outputs.is-javascript == 'true'
73
+ uses: actions/setup-node@v4
37
74
  with:
38
- version: "latest"
75
+ node-version: ${{ matrix.node-version }}
76
+
77
+ - name: Install dependencies (Python)
78
+ if: needs.detect-language.outputs.is-python == 'true'
79
+ run: |
80
+ python -m pip install --upgrade pip
81
+ pip install -e .
82
+ pip install requests
39
83
 
40
- - name: Install dependencies
84
+ - name: Install dependencies (JavaScript)
85
+ if: needs.detect-language.outputs.is-javascript == 'true'
41
86
  run: |
42
- uv pip install --system -e .
43
- uv pip install --system requests
87
+ npm ci
88
+ npm install requests 2>/dev/null || true
44
89
 
45
90
  - name: Get PR number
46
91
  id: pr
@@ -13,6 +13,11 @@ jobs:
13
13
  moai-pipeline:
14
14
  name: "{{PROJECT_NAME}} Pipeline"
15
15
  runs-on: ubuntu-latest
16
+
17
+ strategy:
18
+ matrix:
19
+ python-version: ["3.11", "3.12", "3.13"]
20
+
16
21
  steps:
17
22
  - name: Checkout
18
23
  uses: actions/checkout@v4
@@ -22,7 +27,7 @@ jobs:
22
27
  if: ${{ hashFiles('requirements.txt') != '' || hashFiles('pyproject.toml') != '' || hashFiles('setup.py') != '' }}
23
28
  uses: actions/setup-python@v5
24
29
  with:
25
- python-version: "3.13"
30
+ python-version: ${{ matrix.python-version }}
26
31
 
27
32
  - name: Setup Node.js
28
33
  if: ${{ hashFiles('package.json') != '' }}
@@ -0,0 +1,56 @@
1
+ # @CODE:LDE-002-PHP | SPEC: SPEC-LANGUAGE-DETECTION-EXTENDED-001/spec.md
2
+ # PHP TAG Validation Workflow
3
+ # Validates PHP code with PHPUnit tests, PHPCS linting, and composer dependencies
4
+
5
+ name: PHP TAG Validation
6
+
7
+ on:
8
+ pull_request:
9
+ types: [opened, synchronize, reopened, ready_for_review]
10
+ push:
11
+ branches: [main, develop, "feature/**"]
12
+
13
+ jobs:
14
+ test:
15
+ name: 🧪 PHP Tests & Linting
16
+ runs-on: ubuntu-latest
17
+
18
+ if: github.event.pull_request.draft == false || github.event_name == 'push'
19
+
20
+ permissions:
21
+ contents: read
22
+ pull-requests: write
23
+
24
+ strategy:
25
+ matrix:
26
+ php-version: ['8.1', '8.2', '8.3']
27
+
28
+ steps:
29
+ - name: Checkout code
30
+ uses: actions/checkout@v4
31
+ with:
32
+ fetch-depth: 0
33
+
34
+ - name: Setup PHP
35
+ uses: shivammathur/setup-php@v2
36
+ with:
37
+ php-version: ${{ matrix.php-version }}
38
+ tools: composer, phpunit, phpcs
39
+ coverage: xdebug
40
+
41
+ - name: Install dependencies
42
+ run: composer install --prefer-dist --no-progress
43
+
44
+ - name: Run PHPUnit tests
45
+ run: vendor/bin/phpunit --coverage-text
46
+
47
+ - name: Run PHPCS linting
48
+ run: vendor/bin/phpcs --standard=PSR12 src/
49
+
50
+ - name: Upload coverage artifacts
51
+ if: always()
52
+ uses: actions/upload-artifact@v4
53
+ with:
54
+ name: php-coverage-${{ matrix.php-version }}
55
+ path: coverage/
56
+ retention-days: 30