Skip to content

Commit 7d040d6

Browse files
author
Lucas Yoon
committed
adding renovate and test scripts #1718
Signed-off-by: Lucas Yoon <lyoon@lyoon-thinkpadp1gen7.boston.csb>
1 parent a173e94 commit 7d040d6

2 files changed

Lines changed: 82 additions & 0 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Validate with Devfile Registry Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
validate-devfile:
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
REGISTRY_PATH: ${{ github.workspace }}/registry
16+
17+
steps:
18+
- name: Checkout current repo
19+
uses: actions/checkout@v4
20+
with:
21+
path: current-repo
22+
23+
- name: Checkout devfile registry
24+
uses: actions/checkout@v4
25+
with:
26+
repository: devfile/registry
27+
path: registry
28+
29+
- name: Setup test environment with overrides
30+
run: |
31+
mkdir -p registry/stacks/python-basic
32+
cp -r current-repo/* registry/stacks/python-basic/
33+
34+
- name: Setup Go
35+
uses: actions/setup-go@v4
36+
with:
37+
go-version: '1.21'
38+
39+
- name: Install Ginkgo
40+
run: |
41+
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
42+
sudo chmod +x /usr/local/bin/yq
43+
go install github.com/onsi/ginkgo/v2/ginkgo@latest
44+
45+
- name: Setup Minikube
46+
uses: medyagh/setup-minikube@master
47+
with:
48+
minikube-version: latest
49+
kubernetes-version: v1.28.0
50+
51+
- name: Run Registry Validation Tests
52+
env:
53+
REGISTRY_PATH: ${{ github.workspace }}/registry
54+
TEST_NAMESPACE: "default"
55+
YQ_PATH: "yq"
56+
ENV: "minikube"
57+
run: |
58+
echo "=== Schema Validation ==="
59+
bash tests/validate_devfile_schemas.sh --stacksPath stacks --stackDirs python-basic
60+
61+
- name: Cleanup
62+
if: always()
63+
run: |
64+
kubectl delete pods --all -n default --ignore-not-found=true || true

renovate.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"enabledManagers": ["pip_requirements"],
4+
"pip_requirements": {
5+
"fileMatch": ["requirements\\.txt$"]
6+
},
7+
"packageRules": [
8+
{
9+
"matchManagers": ["pip_requirements"],
10+
"groupName": "python dependencies",
11+
"groupSlug": "python-deps",
12+
"commitMessageTopic": "Python {{depName}}"
13+
}
14+
],
15+
"vulnerabilityAlerts": {
16+
"enabled": true
17+
}
18+
}

0 commit comments

Comments
 (0)