@@ -16,65 +16,15 @@ jobs:
16
16
# Step 1: Checkout the code
17
17
- uses : actions/checkout@v4
18
18
19
- # # Step 2: Install KIND
20
- # - name: Install KIND
21
- # run: |
22
- # # For AMD64 / x86_64
23
- # [ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-amd64
24
- # # For ARM64
25
- # [ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-arm64
26
- # chmod +x ./kind
27
- # sudo mv ./kind /usr/local/bin/kind
28
-
29
- # # Step 3: Verify KIND installation
30
- # - name: Verify KIND installation
31
- # run: kind version
32
-
33
- # - name: Install HELM
34
- # run: |
35
- # curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
36
- # chmod 700 get_helm.sh
37
- # ./get_helm.sh
38
-
39
- # Step 4: Install github cli
19
+ # Step 2: Install github cli
40
20
- name : Install the gh cli
41
21
uses : ksivamuthu/actions-setup-gh-cli@v3
42
22
with :
43
23
version : 2.24.3
44
24
- run : |
45
25
gh version
46
26
47
- # # Step 5: generate GH_TOKEN with permissions to pull private images
48
- # - name: Generate a token
49
- # id: generate-token
50
- # uses: actions/create-github-app-token@v1
51
- # with:
52
- # app-id: "838464"
53
- # private-key: ${{ secrets.OPENMFP_PUBLISHER_PRIVATE_KEY }}
54
- # owner: ${{ github.repository_owner }}
55
- # skip-token-revoke: true
56
- # repositories: |
57
- # portal
58
- # helm-charts
59
- # helm-charts-priv
60
- # example-content
61
- # extension-manager-operator
62
-
63
- # - uses: peter-evans/create-or-update-comment@v3
64
- # with:
65
- # issue-number: 181
66
- # body: "GH Token created"
67
- # reactions: '+1'
68
-
69
- # # Debug step: test docker pull
70
- # - name: Test docker pull
71
- # # GH_TOKEN: ${{ steps.generate-token.outputs.token }}
72
- # # GH_USER: ${{ github.repository_owner }}
73
- # run: |
74
- # docker login ghcr.io -u ${{ github.repository_owner }} -p ${{ steps.generate-token.outputs.token }}
75
- # docker pull ghcr.io/openmfp/portal:0.287.0
76
-
77
- # Step 6: Run start.sh
27
+ # Step 3: Run start.sh
78
28
- name : Run start.sh
79
29
id : run_start_sh
80
30
env :
@@ -87,52 +37,32 @@ jobs:
87
37
./local-setup/scripts/start.sh
88
38
continue-on-error : true
89
39
90
- # # Debug token with docker
91
- # - name: Debug token with docker
40
+ # - name: Debug
41
+ # if: steps.run_start_sh.outcome == 'failure'
92
42
# run: |
93
43
# set -x
94
- # # echo ${{ steps.generate-token.outputs.token }} | base64
95
- # # echo ${{ steps.generate-token.outputs.token }} > token.txt
96
- # # curl -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" https://api.github.com/user
97
- # # cat token.txt
98
- # # docker login ghcr.io -u ${{ github.repository_owner }} -p ${{ steps.generate-token.outputs.token }}
99
- # # docker pull ghcr.io/openmfp/portal:0.287.0
100
-
101
- # curl -H "Authorization: Bearer ${{ secrets.GH_ACCESS_TOKEN }}" https://api.github.com/user
102
- # docker login ghcr.io -u ${{ github.repository_owner }} -p ${{ secrets.GH_ACCESS_TOKEN }}
103
- # docker pull ghcr.io/openmfp/portal:0.287.0
104
-
105
- # debug step 6
106
- - name : Debug6
107
- if : steps.run_start_sh.outcome == 'failure'
108
- run : |
109
- set -x
110
- docker ps
111
- curl -s -i http://localhost:8000/ || true
112
-
113
- kubectl get pods -A -o wide
114
- kubectl get svc -A
115
- kubectl get helmreleases -A
116
- kubectl get deployments -A
117
- kubectl get secrets -A
118
- kubectl get crds -A
119
- kubectl get nodes -o wide
120
-
44
+ # docker ps
45
+ # curl -s -i http://localhost:8000/ || true
46
+
47
+ # kubectl get pods -A -o wide
48
+ # kubectl get svc -A
49
+ # kubectl get helmreleases -A
50
+ # kubectl get deployments -A
51
+ # kubectl get secrets -A
52
+ # kubectl get crds -A
53
+ # kubectl get nodes -o wide
121
54
# echo "Describe all pods which are not Running"
122
55
# kubectl get pods -A --field-selector=status.phase!=Running -o jsonpath='{range .items[*]}{.metadata.namespace} {.metadata.name}{"\n"}{end}' | while read namespace name; do kubectl describe pod $name -n $namespace; done
123
-
124
56
# echo "Describe all helmreleases which are not Ready yet"
125
57
# kubectl get helmreleases -A -o json | jq -r '.items[] | select(.status.conditions[]? | select(.type == "Ready" and .status != "True")) | "\(.metadata.namespace) \(.metadata.name)"' | while read namespace name; do kubectl describe helmrelease $name -n $namespace; done
126
-
127
58
# echo "Print imagePullSecret"
128
59
# kubectl get secret ghcr-credentials -n openmfp-system -o yaml
129
-
130
60
# echo "Test docker login and pull"
131
61
# docker login ghcr.io -u ${{ github.repository_owner }} -p ${{ steps.generate-token.outputs.token }}
132
62
# docker pull ghcr.io/openmfp/portal:0.287.0
133
63
134
64
135
- # Step 7 : Prepare the NodeJS/playwright environment
65
+ # Step 4 : Prepare the NodeJS/playwright environment
136
66
- name : Cache node modules
137
67
uses : actions/cache@v3
138
68
with :
@@ -141,23 +71,23 @@ jobs:
141
71
restore-keys : |
142
72
${{ runner.os }}-node-
143
73
144
- # Step 8 : Install NodeJS and dependencies
74
+ # Step 5 : Install NodeJS and dependencies
145
75
- name : Node ${{ matrix.node-version }}
146
76
uses : actions/setup-node@v3
147
77
with :
148
78
node-version : ${{ matrix.node-version }}
149
79
cache : ' npm'
150
80
cache-dependency-path : ' local-setup/e2e'
151
81
152
- # Step 9 : Install npm dependencies
82
+ # Step 6 : Install npm dependencies
153
83
- name : Clean install of npm dependencies
154
84
run : |
155
85
cd local-setup/e2e
156
86
npm install
157
87
npm ci
158
88
npx playwright install
159
89
160
- # Step 10 : Run the end-to-end tests
90
+ # Step 7 : Run the end-to-end tests
161
91
- name : End2End tests
162
92
run : |
163
93
sleep 10
0 commit comments