2828
2929 - name : Setup test environment with overrides
3030 run : |
31- # Copy devfile to registry tests directory for validation
32- cp current-repo/devfile.yaml registry/tests/
31+ # Create the expected directory structure for validation
32+ mkdir -p registry/tests/sample-stack
33+ cp current-repo/devfile.yaml registry/tests/sample-stack/
34+ cp -r current-repo/* registry/tests/sample-stack/ 2>/dev/null || true
35+
36+ # Create a simple get_stacks.sh that returns our sample directory
37+ mkdir -p registry/tests/tests
38+ echo '#!/bin/bash' > registry/tests/tests/get_stacks.sh
39+ echo 'echo "sample-stack"' >> registry/tests/tests/get_stacks.sh
40+ chmod +x registry/tests/tests/get_stacks.sh
3341
3442 - name : Setup Go
3543 uses : actions/setup-go@v4
@@ -51,23 +59,19 @@ jobs:
5159 - name : Run Registry Validation Tests
5260 env :
5361 REGISTRY_PATH : ${{ github.workspace }}/registry
54- DEVFILE_PATH : ${{ github.workspace }}/current-repo/devfile.yaml
5562 TEST_NAMESPACE : " default"
5663 YQ_PATH : " yq"
5764 ENV : " minikube"
5865 run : |
59- # cd registry/tests
60-
66+ cd registry/tests
67+
6168 echo "=== Schema Validation ==="
62- # Run schema validation directly on the devfile
63- # yq eval 'true' devfile.yaml > /dev/null || (echo "Invalid YAML in devfile" && exit 1)
64-
69+ # Use the registry's validate_devfile_schemas.sh script
70+ bash validate_devfile_schemas.sh --stacksPath $(pwd) --stackDirs "sample-stack"
6571
6672 echo "=== ODO v3 Validation ==="
67- # bash registry/tests/check_odov3.sh
68-
69- # Use the updated script that accepts input files directly
70- bash registry/tests/check_odov3.sh --stacksPath $(pwd)/current-repo --stackDirs "."
73+ # Use the registry's check_odov3.sh script
74+ bash check_odov3.sh --stacksPath $(pwd) --stackDirs "sample-stack"
7175
7276 - name : Cleanup
7377 if : always()
0 commit comments