Skip to content

Commit 96ac04b

Browse files
author
Lucas Yoon
committed
update schema
1 parent 0f2b1a2 commit 96ac04b

5 files changed

Lines changed: 9 additions & 345 deletions

File tree

.github/workflows/validate-with-registry.yaml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
validate-devfile:
1212
runs-on: ubuntu-latest
13-
13+
1414
env:
1515
REGISTRY_PATH: ${{ github.workspace }}/registry
1616

@@ -28,22 +28,8 @@ jobs:
2828

2929
- name: Setup test environment with overrides
3030
run: |
31-
# Copy entire project for devfile validation
32-
mkdir -p test-sample
33-
cp -r current-repo/* test-sample/
34-
35-
# Stage registry test files and apply local overrides
36-
mkdir -p test-environment/tests
37-
cp -r registry/tests/* test-environment/tests/
38-
39-
if [ -d "current-repo/tests" ]; then
40-
echo "Applying local test overrides..."
41-
cp -r current-repo/tests/* test-environment/tests/ 2>/dev/null || true
42-
fi
43-
44-
# Copy staged files to execution location
45-
cp -r test-environment/tests/* registry/tests/
46-
cp -r test-sample/* registry/tests/
31+
# Copy devfile to registry tests directory for validation
32+
cp current-repo/devfile.yaml registry/tests/
4733
4834
- name: Setup Go
4935
uses: actions/setup-go@v4
@@ -70,16 +56,15 @@ jobs:
7056
YQ_PATH: "yq"
7157
ENV: "minikube"
7258
run: |
73-
cd registry/tests/check_non_terminating
74-
go build -o flatten-parent .
75-
cd ../../..
59+
cd registry/tests
7660
7761
echo "=== Schema Validation ==="
78-
cd registry/tests
79-
bash validate_devfile_schemas.sh
62+
# Run schema validation directly on the devfile
63+
yq eval 'true' devfile.yaml > /dev/null || (echo "Invalid YAML in devfile" && exit 1)
8064
81-
echo "=== Non-terminating Test ==="
82-
bash check_non_terminating.sh
65+
echo "=== ODO v3 Validation ==="
66+
# Use the updated script that accepts input files directly
67+
bash check_odov3.sh --stacksPath $(pwd) --stackDirs "."
8368
8469
- name: Cleanup
8570
if: always()

tests/README.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/check_non_terminating.sh

Lines changed: 0 additions & 211 deletions
This file was deleted.

tests/check_odov3.sh

Lines changed: 0 additions & 38 deletions
This file was deleted.

tests/validate_devfile_schemas.sh

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)