Skip to content

Commit 3290612

Browse files
committed
CLOUDP-325901: Run all test on nightlies (version 2)
Signed-off-by: jose.vazquez <[email protected]>
1 parent bbac1c7 commit 3290612

File tree

3 files changed

+31
-15
lines changed

3 files changed

+31
-15
lines changed

.github/codecov.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ component_management:
2828
paths:
2929
- "!tests/"
3030
- "!tools/"
31+
statuses:
32+
- type: project
33+
threshold: -0.5 # Allow -0.5% regression in coverage
34+
carryforward: false
35+
target: auto
36+
informational: true
37+
- type: patch
3138
- component_id: test-helpers
3239
name: test-helpers
3340
paths:

.github/workflows/tests-e2e2.yaml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,21 @@ jobs:
7474
E2E2_LABELS: ${{ env.e2e2_labels }}
7575
USE_JSON: true
7676
run: |
77+
PR_LABELS=${{ env.PR_LABELS }}
78+
# Nightly runs all tests, overriding PR labels as '["test/e2e2/*"]'
79+
if [ "${{ github.ref }}" == "refs/heads/main" ];then
80+
PR_LABELS='["test/e2e2/*"]'
81+
echo "Nightly runs all tests"
82+
fi
7783
echo PR_LABELS=${{ env.PR_LABELS }}
7884
echo E2E2_LABELS=${{ env.E2E2_LABELS }}
79-
make compute-labels
80-
./bin/ginkgo-labels > result.json
85+
if [ "${PR_LABELS}" == '["test/e2e2/*"]' ]; then
86+
echo "["all-e2e2-tests"]" > result.json
87+
else
88+
make compute-labels
89+
./bin/ginkgo-labels > result.json
90+
fi
8191
echo "E2E2 tests to execute $(cat result.json | jq -c .e2e2)"
82-
8392
echo "e2e2_matrix=$(cat result.json | jq -c .e2e2)" >> $GITHUB_OUTPUT
8493
8594
compute:
@@ -94,8 +103,10 @@ jobs:
94103
run: |
95104
# Note the use of external single quotes to allow for double quotes at inline YAML array
96105
matrix='["v1.30.10-kind"]'
106+
# Nightly runs in both the newest and oldest supported Kubernetes versions
97107
if [ "${{ github.ref }}" == "refs/heads/main" ];then
98108
matrix='["v1.30.10-kind", "v1.32.2-kind"]'
109+
echo "Nightly runs oldest and newest Kubernetes supported versions"
99110
fi
100111
echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}"
101112
cat "${GITHUB_OUTPUT}"
@@ -173,7 +184,12 @@ jobs:
173184
USE_KIND: false
174185
run: |
175186
echo "Using ENV: ${{ steps.select-env.outputs.ENV }}"
176-
devbox run -- make e2e2 label=${{ env.TEST_NAME }}
187+
label=${TEST_NAME}
188+
if [ "${TEST_NAME}" == "all-e2e2-tests" ]; then
189+
echo "Passing an empty label to run all tests"
190+
label=""
191+
fi
192+
devbox run -- make e2e2 label="${label}"
177193
178194
- name: Upload operator logs
179195
if: ${{ failure() }}

test/e2e2/integration_test.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,10 @@ var _ = Describe("Atlas Third-Party Integrations Controller", Ordered, Label("in
5656
var testNamespace *corev1.Namespace
5757

5858
_ = BeforeAll(func() {
59+
if !version.IsExperimental() {
60+
Skip("Skipping experimental test on non experimental build")
61+
}
5962
deletionProtectionOff := false
60-
Expect(version.IsExperimental()).To(BeTrue())
6163
ako = runTestAKO(DefaultGlobalCredentials, control.MustEnvVar("OPERATOR_NAMESPACE"), deletionProtectionOff)
6264
ako.Start(GinkgoT())
6365

@@ -160,62 +162,53 @@ var _ = Describe("Atlas Third-Party Integrations Controller", Ordered, Label("in
160162
})
161163
},
162164
Entry("Test[datadog]: Datadog integration with a parent project",
163-
Label("datadog"),
164165
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/datadog.sample.yml")),
165166
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/datadog.update.yml")),
166167
"atlas-datadog-integ",
167168
),
168169
Entry("Test[msteams]: Microsoft Teams integration with a parent project",
169-
Label("msteams"),
170170
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/msteams.sample.yml")),
171171
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/msteams.update.yml")),
172172
"atlas-msteams-integ",
173173
),
174174
Entry("Test[newrelic]: New Relic integration with a parent project",
175-
Label("newrelic"),
176175
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/newrelic.sample.yml")),
177176
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/newrelic.update.yml")),
178177
"atlas-newrelic-integ",
179178
),
180179
Entry("Test[opsgenie]: Ops Genie integration with a parent project",
181-
Label("opsgenie"),
182180
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/opsgenie.sample.yml")),
183181
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/opsgenie.update.yml")),
184182
"atlas-opsgenie-integ",
185183
),
186184
Entry("Test[pagerduty]: PagerDuty integration with a parent project",
187-
Label("pagerduty"),
188185
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/pagerduty.sample.yml")),
189186
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/pagerduty.update.yml")),
190187
"atlas-pagerduty-integ",
191188
),
192189
Entry("Test[prometheus]: Prometheus integration with a parent project",
193-
Label("prometheus"),
194190
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/prometheus.sample.yml")),
195191
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/prometheus.update.yml")),
196192
"atlas-prometheus-integ",
197193
),
198194
Entry("Test[slack]: Slack integration with a parent project",
199-
Label("slack"),
200195
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/slack.sample.yml")),
201196
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/slack.update.yml")),
202197
"atlas-slack-integ",
203198
),
204199
Entry("Test[victorops]: Victor Ops integration with a parent project",
205-
Label("victorops"),
206200
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/victorops.sample.yml")),
207201
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/victorops.update.yml")),
208202
"atlas-victorops-integ",
209203
),
210204
Entry("Test[webhook]: Webhooks integration with a parent project",
211-
Label("webhook"),
212205
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/webhook.sample.yml")),
213206
yml.MustParseObjects(yml.MustOpen(integrations, "integrations/webhook.update.yml")),
214207
"atlas-webhook-integ",
215208
),
216209
)
217210

218-
It("Can handle isolated integrations", Label("isolated-integration"), func() {
211+
It("Can handle isolated integrations", func() {
219212
project := akov2.AtlasProject{
220213
TypeMeta: v1.TypeMeta{Kind: "AtlasProject", APIVersion: akov2.GroupVersion.String()},
221214
ObjectMeta: v1.ObjectMeta{Name: "atlas-project", Namespace: testNamespace.Name},

0 commit comments

Comments
 (0)