@@ -2,13 +2,13 @@ name: ChaosOperator-E2E-pipeline
2
2
on :
3
3
issue_comment :
4
4
types : [created]
5
-
5
+
6
6
jobs :
7
7
Tests :
8
8
if : contains(github.event.comment.html_url, '/pull/') && startsWith(github.event.comment.body, '/run-e2e')
9
9
runs-on : ubuntu-latest
10
10
steps :
11
-
11
+
12
12
- name : Notification for e2e Start
13
13
uses : peter-evans/create-or-update-comment@v1
14
14
with :
@@ -19,13 +19,13 @@ jobs:
19
19
20
20
- uses : actions/setup-go@v2
21
21
with :
22
- go-version : 1.20.0
23
-
24
- - name : Setting up GOPATH
22
+ go-version : 1.22
23
+
24
+ - name : Setting up GOPATH
25
25
run : |
26
26
echo ::set-env name=GOPATH::${GITHUB_WORKSPACE}/go
27
27
env :
28
- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
28
+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
29
29
30
30
# Using the last commit id of pull request
31
31
@@ -36,20 +36,20 @@ jobs:
36
36
pull_number : ${{ github.event.issue.number }}
37
37
env :
38
38
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39
-
39
+
40
40
- name : set commit to output
41
41
id : getcommit
42
42
run : |
43
43
prsha=$(echo $response | jq '.[-1].sha' | tr -d '"')
44
- echo "::set-output name=sha::$prsha"
45
- env :
44
+ echo "::set-output name=sha::$prsha"
45
+ env :
46
46
response : ${{ steps.get_PR_commits.outputs.data }}
47
-
47
+
48
48
- uses : actions/checkout@v2
49
49
with :
50
50
ref : ${{steps.getcommit.outputs.sha}}
51
51
path : go/src/github.com/litmuschaos/chaos-operator
52
-
52
+
53
53
- name : Build docker image
54
54
run : |
55
55
export PATH=$PATH:$(go env GOPATH)/bin
62
62
63
63
with :
64
64
version : " v0.22.0"
65
-
65
+
66
66
- name : Configuring and testing kind Installation
67
67
run : |
68
68
kubectl cluster-info
@@ -88,16 +88,16 @@ jobs:
88
88
env :
89
89
OPERATOR_IMAGE : litmuschaos/chaos-operator:ci
90
90
IMAGE_PULL_POLICY : IfNotPresent
91
- KUBECONFIG : /home/runner/.kube/config
92
-
91
+ KUBECONFIG : /home/runner/.kube/config
92
+
93
93
- name : Run Admin mode test
94
94
if : startsWith(github.event.comment.body, '/run-e2e-admin-mode') || startsWith(github.event.comment.body, '/run-e2e-all')
95
95
run : |
96
96
export PATH=$PATH:$(go env GOPATH)/bin
97
97
cd ${GOPATH}/src/github.com/litmuschaos/litmus-e2e
98
98
go test components/operator/admin-mode_test.go -v -count=1
99
99
env :
100
- KUBECONFIG : /home/runner/.kube/config
100
+ KUBECONFIG : /home/runner/.kube/config
101
101
102
102
- name : Run Reconcile Resiliency test
103
103
if : startsWith(github.event.comment.body, '/run-e2e-reconcile-resiliency') || startsWith(github.event.comment.body, '/run-e2e-all')
@@ -106,7 +106,7 @@ jobs:
106
106
cd ${GOPATH}/src/github.com/litmuschaos/litmus-e2e
107
107
go test components/operator/reconcile-resiliency_test.go -v -count=1
108
108
env :
109
- KUBECONFIG : /home/runner/.kube/config
109
+ KUBECONFIG : /home/runner/.kube/config
110
110
111
111
- name : Check the test run
112
112
if : |
@@ -115,7 +115,7 @@ jobs:
115
115
run : |
116
116
echo ::set-env name=TEST_RUN::true
117
117
env :
118
- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
118
+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
119
119
120
120
- name : Check for all the jobs are succeeded
121
121
if : ${{ success() && env.TEST_RUN == 'true' }}
@@ -125,27 +125,27 @@ jobs:
125
125
body : |
126
126
**Test Result:** All tests are passed
127
127
**Logs:** [${{ env.RUN_ID }}](https://github.com/litmuschaos/chaos-operator/actions/runs/${{ env.RUN_ID }})
128
-
129
- reactions : hooray
130
- env :
128
+
129
+ reactions : hooray
130
+ env :
131
131
RUN_ID : ${{ github.run_id }}
132
-
132
+
133
133
- name : Check for any job failed
134
134
if : ${{ failure() }}
135
135
uses : peter-evans/create-or-update-comment@v1
136
136
with :
137
137
comment-id : " ${{ github.event.comment.id }}"
138
138
body : |
139
139
**Test Failed:** Some tests are failed please check
140
- **Logs:** [${{ env.RUN_ID }}](https://github.com/litmuschaos/chaos-operator/actions/runs/${{ env.RUN_ID }})
140
+ **Logs:** [${{ env.RUN_ID }}](https://github.com/litmuschaos/chaos-operator/actions/runs/${{ env.RUN_ID }})
141
141
reactions : confused
142
- env :
142
+ env :
143
143
RUN_ID : ${{ github.run_id }}
144
-
144
+
145
145
- name : Deleting KinD cluster
146
146
if : ${{ always() }}
147
147
run : kind delete cluster
148
-
148
+
149
149
- name : Check if any test ran or not
150
150
if : env.TEST_RUN != 'true'
151
151
uses : peter-evans/create-or-update-comment@v1
@@ -155,5 +155,5 @@ jobs:
155
155
**Test Result:** No test found try /run-e2e-all
156
156
**Logs:** [${{ env.RUN_ID }}](https://github.com/litmuschaos/chaos-operator/actions/runs/${{ env.RUN_ID }})
157
157
reactions : eyes
158
- env :
158
+ env :
159
159
RUN_ID : ${{ github.run_id }}
0 commit comments