Skip to content

Commit e4b52b0

Browse files
committed
unit test coverage
Signed-off-by: Wenqi Qiu <wenqiq@vmware.com>
1 parent e7486d5 commit e4b52b0

File tree

4 files changed

+86
-104
lines changed

4 files changed

+86
-104
lines changed

.github/workflows/kind.yml

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,20 @@ jobs:
9898
ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-encap-coverage ./ci/kind/test-e2e-kind.sh --encap-mode encap --coverage
9999
- name: Tar coverage files
100100
run: tar -czf test-e2e-encap-coverage.tar.gz test-e2e-encap-coverage
101-
- name: Upload coverage for test-e2e-encap-coverage
102-
uses: actions/upload-artifact@v3
103-
with:
104-
name: test-e2e-encap-coverage
105-
path: test-e2e-encap-coverage.tar.gz
106-
retention-days: 30
107-
- name: Codecov
108-
uses: codecov/codecov-action@v3
109-
with:
110-
token: ${{ secrets.CODECOV_TOKEN }}
111-
file: '*.cov.out*'
112-
flags: kind-e2e-tests
113-
name: codecov-test-e2e-encap
114-
directory: test-e2e-encap-coverage
101+
# - name: Upload coverage for test-e2e-encap-coverage
102+
# uses: actions/upload-artifact@v3
103+
# with:
104+
# name: test-e2e-encap-coverage
105+
# path: test-e2e-encap-coverage.tar.gz
106+
# retention-days: 30
107+
# - name: Codecov
108+
# uses: codecov/codecov-action@v3
109+
# with:
110+
# token: ${{ secrets.CODECOV_TOKEN }}
111+
# file: '*.cov.out*'
112+
# flags: kind-e2e-tests
113+
# name: codecov-test-e2e-encap
114+
# directory: test-e2e-encap-coverage
115115
- name: Tar log files
116116
if: ${{ failure() }}
117117
run: tar -czf log.tar.gz log
@@ -156,20 +156,20 @@ jobs:
156156
ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-encap-no-proxy-coverage ./ci/kind/test-e2e-kind.sh --encap-mode encap --feature-gates AntreaProxy=false --coverage --skip mode-irrelevant
157157
- name: Tar coverage files
158158
run: tar -czf test-e2e-encap-no-proxy-coverage.tar.gz test-e2e-encap-no-proxy-coverage
159-
- name: Upload coverage for test-e2e-encap-no-proxy-coverage
160-
uses: actions/upload-artifact@v3
161-
with:
162-
name: test-e2e-encap-no-proxy-coverage
163-
path: test-e2e-encap-no-proxy-coverage.tar.gz
164-
retention-days: 30
165-
- name: Codecov
166-
uses: codecov/codecov-action@v3
167-
with:
168-
token: ${{ secrets.CODECOV_TOKEN }}
169-
file: '*.cov.out*'
170-
flags: kind-e2e-tests
171-
name: codecov-test-e2e-encap-no-proxy
172-
directory: test-e2e-encap-no-proxy-coverage
159+
# - name: Upload coverage for test-e2e-encap-no-proxy-coverage
160+
# uses: actions/upload-artifact@v3
161+
# with:
162+
# name: test-e2e-encap-no-proxy-coverage
163+
# path: test-e2e-encap-no-proxy-coverage.tar.gz
164+
# retention-days: 30
165+
# - name: Codecov
166+
# uses: codecov/codecov-action@v3
167+
# with:
168+
# token: ${{ secrets.CODECOV_TOKEN }}
169+
# file: '*.cov.out*'
170+
# flags: kind-e2e-tests
171+
# name: codecov-test-e2e-encap-no-proxy
172+
# directory: test-e2e-encap-no-proxy-coverage
173173
- name: Tar log files
174174
if: ${{ failure() }}
175175
run: tar -czf log.tar.gz log
@@ -215,20 +215,20 @@ jobs:
215215
ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-encap-all-features-enabled-coverage ./ci/kind/test-e2e-kind.sh --encap-mode encap --coverage --feature-gates AllAlpha=true,AllBeta=true,Multicast=false --proxy-all
216216
- name: Tar coverage files
217217
run: tar -czf test-e2e-encap-all-features-enabled-coverage.tar.gz test-e2e-encap-all-features-enabled-coverage
218-
- name: Upload coverage for test-e2e-encap-all-features-enabled-coverage
219-
uses: actions/upload-artifact@v3
220-
with:
221-
name: test-e2e-encap-all-features-enabled-coverage
222-
path: test-e2e-encap-all-features-enabled-coverage.tar.gz
223-
retention-days: 30
224-
- name: Codecov
225-
uses: codecov/codecov-action@v3
226-
with:
227-
token: ${{ secrets.CODECOV_TOKEN }}
228-
file: '*.cov.out*'
229-
flags: kind-e2e-tests
230-
name: codecov-test-e2e-encap-all-features-enabled
231-
directory: test-e2e-encap-all-features-enabled-coverage
218+
# - name: Upload coverage for test-e2e-encap-all-features-enabled-coverage
219+
# uses: actions/upload-artifact@v3
220+
# with:
221+
# name: test-e2e-encap-all-features-enabled-coverage
222+
# path: test-e2e-encap-all-features-enabled-coverage.tar.gz
223+
# retention-days: 30
224+
# - name: Codecov
225+
# uses: codecov/codecov-action@v3
226+
# with:
227+
# token: ${{ secrets.CODECOV_TOKEN }}
228+
# file: '*.cov.out*'
229+
# flags: kind-e2e-tests
230+
# name: codecov-test-e2e-encap-all-features-enabled
231+
# directory: test-e2e-encap-all-features-enabled-coverage
232232
- name: Tar log files
233233
if: ${{ failure() }}
234234
run: tar -czf log.tar.gz log
@@ -273,20 +273,20 @@ jobs:
273273
ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-noencap-coverage ./ci/kind/test-e2e-kind.sh --encap-mode noEncap --coverage --skip mode-irrelevant
274274
- name: Tar coverage files
275275
run: tar -czf test-e2e-noencap-coverage.tar.gz test-e2e-noencap-coverage
276-
- name: Upload coverage for test-e2e-noencap-coverage
277-
uses: actions/upload-artifact@v3
278-
with:
279-
name: test-e2e-noencap-coverage
280-
path: test-e2e-noencap-coverage.tar.gz
281-
retention-days: 30
282-
- name: Codecov
283-
uses: codecov/codecov-action@v3
284-
with:
285-
token: ${{ secrets.CODECOV_TOKEN }}
286-
file: '*.cov.out*'
287-
flags: kind-e2e-tests
288-
name: codecov-test-e2e-noencap
289-
directory: test-e2e-noencap-coverage
276+
# - name: Upload coverage for test-e2e-noencap-coverage
277+
# uses: actions/upload-artifact@v3
278+
# with:
279+
# name: test-e2e-noencap-coverage
280+
# path: test-e2e-noencap-coverage.tar.gz
281+
# retention-days: 30
282+
# - name: Codecov
283+
# uses: codecov/codecov-action@v3
284+
# with:
285+
# token: ${{ secrets.CODECOV_TOKEN }}
286+
# file: '*.cov.out*'
287+
# flags: kind-e2e-tests
288+
# name: codecov-test-e2e-noencap
289+
# directory: test-e2e-noencap-coverage
290290
- name: Tar log files
291291
if: ${{ failure() }}
292292
run: tar -czf log.tar.gz log
@@ -331,20 +331,20 @@ jobs:
331331
ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-hybrid-coverage ./ci/kind/test-e2e-kind.sh --encap-mode hybrid --coverage --skip mode-irrelevant
332332
- name: Tar coverage files
333333
run: tar -czf test-e2e-hybrid-coverage.tar.gz test-e2e-hybrid-coverage
334-
- name: Upload coverage for test-e2e-hybrid-coverage
335-
uses: actions/upload-artifact@v3
336-
with:
337-
name: test-e2e-hybrid-coverage
338-
path: test-e2e-hybrid-coverage.tar.gz
339-
retention-days: 30
340-
- name: Codecov
341-
uses: codecov/codecov-action@v3
342-
with:
343-
token: ${{ secrets.CODECOV_TOKEN }}
344-
file: '*.cov.out*'
345-
flags: kind-e2e-tests
346-
name: codecov-test-e2e-hybrid
347-
directory: test-e2e-hybrid-coverage
334+
# - name: Upload coverage for test-e2e-hybrid-coverage
335+
# uses: actions/upload-artifact@v3
336+
# with:
337+
# name: test-e2e-hybrid-coverage
338+
# path: test-e2e-hybrid-coverage.tar.gz
339+
# retention-days: 30
340+
# - name: Codecov
341+
# uses: codecov/codecov-action@v3
342+
# with:
343+
# token: ${{ secrets.CODECOV_TOKEN }}
344+
# file: '*.cov.out*'
345+
# flags: kind-e2e-tests
346+
# name: codecov-test-e2e-hybrid
347+
# directory: test-e2e-hybrid-coverage
348348
- name: Tar log files
349349
if: ${{ failure() }}
350350
run: tar -czf log.tar.gz log
@@ -396,20 +396,20 @@ jobs:
396396
ANTREA_LOG_DIR=$PWD/log ANTREA_COV_DIR=$PWD/test-e2e-fa-coverage ./ci/kind/test-e2e-kind.sh --encap-mode encap --coverage --flow-visibility
397397
- name: Tar coverage files
398398
run: tar -czf test-e2e-fa-coverage.tar.gz test-e2e-fa-coverage
399-
- name: Upload coverage for test-e2e-fa-coverage
400-
uses: actions/upload-artifact@v3
401-
with:
402-
name: test-e2e-fa-coverage
403-
path: test-e2e-fa-coverage.tar.gz
404-
retention-days: 30
405-
- name: Codecov
406-
uses: codecov/codecov-action@v3
407-
with:
408-
token: ${{ secrets.CODECOV_TOKEN }}
409-
file: '*.cov.out*'
410-
flags: kind-e2e-tests
411-
name: codecov-test-e2e-fa
412-
directory: test-e2e-fa-coverage
399+
# - name: Upload coverage for test-e2e-fa-coverage
400+
# uses: actions/upload-artifact@v3
401+
# with:
402+
# name: test-e2e-fa-coverage
403+
# path: test-e2e-fa-coverage.tar.gz
404+
# retention-days: 30
405+
# - name: Codecov
406+
# uses: codecov/codecov-action@v3
407+
# with:
408+
# token: ${{ secrets.CODECOV_TOKEN }}
409+
# file: '*.cov.out*'
410+
# flags: kind-e2e-tests
411+
# name: codecov-test-e2e-fa
412+
# directory: test-e2e-fa-coverage
413413
- name: Tar log files
414414
if: ${{ failure() }}
415415
run: tar -czf log.tar.gz log

ci/jenkins/test-mc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function run_codecov { (set -e
243243
shasum -a 256 -c codecov.SHA256SUM
244244

245245
chmod +x codecov
246-
./codecov -c -t ${CODECOV_TOKEN} -F ${flag} -f ${file} -s ${dir} -C ${GIT_COMMIT} -r antrea-io/antrea
246+
#./codecov -c -t ${CODECOV_TOKEN} -F ${flag} -f ${file} -s ${dir} -C ${GIT_COMMIT} -r antrea-io/antrea
247247

248248
rm -f trustedkeys.gpg codecov
249249
)}

ci/jenkins/test-vmc.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,6 @@ function run_codecov { (set -e
326326

327327
chmod +x codecov
328328

329-
if [[ $remote == true ]]; then
330-
${SCP_WITH_UTILS_KEY} codecov jenkins@${ip}:~
331-
${SSH_WITH_UTILS_KEY} -n jenkins@${ip} "cd antrea; ~/codecov -c -t ${CODECOV_TOKEN} -F ${flag} -f ${file} -C ${GIT_COMMIT} -r antrea-io/antrea"
332-
else
333-
./codecov -c -t ${CODECOV_TOKEN} -F ${flag} -f ${file} -s ${dir} -C ${GIT_COMMIT} -r antrea-io/antrea
334-
fi
335329
rm -f trustedkeys.gpg codecov
336330
)}
337331

codecov.yaml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ comment:
88
require_changes: no
99
require_base: no
1010
require_head: no
11-
after_n_builds: 1
11+
after_n_builds: 5
1212
show_carryforward_flags: true
1313

1414
github_checks:
@@ -31,18 +31,6 @@ coverage:
3131
target: auto
3232
flags:
3333
- unit-tests
34-
antrea-integration-tests:
35-
target: auto
36-
flags:
37-
- integration-tests
38-
antrea-e2e-tests:
39-
target: auto
40-
flags:
41-
- e2e-tests
42-
antrea-kind-e2e-tests:
43-
target: auto
44-
flags:
45-
- kind-e2e-tests
4634

4735
flag_management:
4836
default_rules:

0 commit comments

Comments
 (0)