Skip to content
This repository was archived by the owner on Nov 27, 2025. It is now read-only.

Commit 988c1bd

Browse files
add registry test cases
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
1 parent 1509690 commit 988c1bd

File tree

1 file changed

+134
-0
lines changed

1 file changed

+134
-0
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Validate with Devfile Registry Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
env:
14+
MINIKUBE_VERSION: 'v1.29.0'
15+
MINIKUBE_RESOURCES: '--memory 14gb --cpus 4'
16+
KUBERNETES_VERSION: 'v1.25.2'
17+
TEST_DELTA: false
18+
REGISTRY_PATH: ${{ github.workspace }}/registry
19+
GO_VERSION: '1.23'
20+
GINKGO_VERSION: v2.19.0
21+
YQ_VERSION: v4.44.1
22+
ODOV3_VERSION: '3.16.1'
23+
24+
jobs:
25+
validate-devfile-schema:
26+
name: validate devfile schemas
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout current repo
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
with:
32+
path: current-repo
33+
34+
- name: Checkout devfile registry
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
with:
37+
repository: devfile/registry
38+
path: ${{ env.REGISTRY_PATH }}
39+
40+
- name: Setup Go
41+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
42+
with:
43+
go-version: ${{ env.GO_VERSION }}
44+
45+
- name: Install yq
46+
run: |
47+
curl -sL -O https://github.com/mikefarah/yq/releases/download/${{ env.YQ_VERSION }}/yq_linux_amd64 -o /usr/local/bin/yq && mv ./yq_linux_amd64 /usr/local/bin/yq && chmod +x /usr/local/bin/yq
48+
49+
- name: Install Ginkgo
50+
run: go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
51+
52+
- name: Validate sample
53+
run: (cd ${{ env.REGISTRY_PATH }} && bash tests/validate_devfile_schemas.sh --stacksPath ${{ github.workspace }} --stackDirs current-repo)
54+
55+
non-terminating:
56+
name: check for non-terminating images
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
61+
with:
62+
path: current-repo
63+
fetch-depth: 0
64+
65+
- name: Checkout devfile registry
66+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
67+
with:
68+
repository: devfile/registry
69+
path: ${{ env.REGISTRY_PATH }}
70+
71+
- name: Setup Go
72+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
73+
with:
74+
go-version: ${{ env.GO_VERSION }}
75+
76+
- name: Setup Minikube
77+
uses: manusa/actions-setup-minikube@0e8062ceff873bd77979f39cf8fd3621416afe4d # v2.13.0
78+
with:
79+
minikube version: ${{ env.MINIKUBE_VERSION }}
80+
kubernetes version: ${{ env.KUBERNETES_VERSION }}
81+
driver: "docker"
82+
github token: ${{ secrets.GITHUB_TOKEN }}
83+
start args: "--addons=ingress ${{ env.MINIKUBE_RESOURCES }}"
84+
85+
- name: Check that containers components are non terminating
86+
run: |
87+
go build -C ${{ env.REGISTRY_PATH }}/tests/check_non_terminating -o flatten-parent
88+
bash ${{ env.REGISTRY_PATH }}/tests/check_non_terminating.sh --stacksPath $(pwd) --stackDirs current-repo
89+
90+
odov3:
91+
name: with odo v3
92+
runs-on: ubuntu-latest
93+
needs: [non-terminating, validate-devfile-schema]
94+
if: success() || failure()
95+
steps:
96+
- name: Checkout
97+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
98+
with:
99+
path: current-repo
100+
fetch-depth: 0
101+
102+
- name: Checkout devfile registry
103+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
104+
with:
105+
repository: devfile/registry
106+
path: ${{ env.REGISTRY_PATH }}
107+
108+
- name: Setup Minikube
109+
uses: manusa/actions-setup-minikube@0e8062ceff873bd77979f39cf8fd3621416afe4d # v2.13.0
110+
with:
111+
minikube version: ${{ env.MINIKUBE_VERSION }}
112+
kubernetes version: ${{ env.KUBERNETES_VERSION }}
113+
driver: "docker"
114+
github token: ${{ secrets.GITHUB_TOKEN }}
115+
start args: "--addons=ingress ${{ env.MINIKUBE_RESOURCES }}"
116+
117+
- name: Install Go
118+
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
119+
with:
120+
go-version: ${{ env.GO_VERSION }}
121+
122+
- name: Install odo latest version v3
123+
uses: redhat-actions/openshift-tools-installer@2de9a80cf012ad0601021515481d433b91ef8fd5 # v1
124+
with:
125+
odo: ${{ env.ODOV3_VERSION }}
126+
127+
- name: Install Ginkgo
128+
run: go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
129+
130+
- name: Check odo version
131+
run: odo version
132+
133+
- name: Check the devfile sample with odo v3
134+
run: (cd ${{ env.REGISTRY_PATH }} && bash tests/check_odov3.sh --stacksPath ${{ github.workspace }} --stackDirs current-repo)

0 commit comments

Comments
 (0)