Skip to content

Commit 021dc3c

Browse files
Merge branch 'onur/inframework_deploy_test' of https://github.com/NVIDIA/NeMo into onur/inframework_deploy_test
2 parents 569fd7e + f1a6b8d commit 021dc3c

File tree

524 files changed

+29120
-3229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

524 files changed

+29120
-3229
lines changed

.coveragerc

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
[run]
2+
concurrency = thread,multiprocessing
3+
omit =
4+
/tmp/*
5+
/home/TestData/*
6+
/workspace/Megatron-LM/*
7+
nemo/collections/nlp/*
8+
nemo/collections/multimodal/*
9+
nemo/collections/vision/*
10+
111
[paths]
212
source =
313
nemo/
414
/home/runner/work/NeMo/NeMo/nemo
5-
/workspace/nemo
15+
/workspace/nemo
16+

.github/workflows/_test_template.yml

+15-19
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ jobs:
5050
potential_infra_failure: ${{ steps.check.outputs.potential_infra_failure }}
5151
env:
5252
DIR: ${{ github.run_id }}
53+
IS_OPTIONAL: ${{ inputs.IS_OPTIONAL }}
54+
SCRIPT: ${{ inputs.SCRIPT }}
55+
IS_UNIT_TEST: ${{ inputs.IS_UNIT_TEST }}
5356
steps:
5457
- name: Docker system cleanup
5558
run: |
@@ -60,8 +63,6 @@ jobs:
6063
docker pull nemoci.azurecr.io/nemo_container:${{ github.run_id }}
6164
6265
- name: Start container
63-
env:
64-
DIR: ${{ github.run_id }}
6566
run: |
6667
mkdir -p $DIR
6768
@@ -90,10 +91,6 @@ jobs:
9091
bash $DIR/retry_job.sh
9192
9293
- name: Create run-script
93-
env:
94-
DIR: ${{ github.run_id }}
95-
SCRIPT: ${{ inputs.SCRIPT }}
96-
IS_UNIT_TEST: ${{ inputs.IS_UNIT_TEST }}
9794
id: create
9895
run: |
9996
@@ -110,7 +107,7 @@ jobs:
110107
(
111108
set -e
112109
113-
docker exec nemo_container_${{ github.run_id }} bash -c '$SCRIPT && echo "Finished successfully." || echo "Did not finish."'
110+
docker exec -t nemo_container_${{ github.run_id }} bash -c 'RUN_ID=${{ github.run_id }} bash tests/functional_tests/$SCRIPT.sh && echo "Finished successfully." || echo "Did not finish."'
114111
) 2>&1 | tee $DIR/err.log
115112
116113
RUN_TEST_EOF
@@ -131,8 +128,6 @@ jobs:
131128

132129
- name: Check result
133130
id: check
134-
env:
135-
IS_OPTIONAL: ${{ inputs.IS_OPTIONAL }}
136131
run: |
137132
cat $DIR/err.log
138133
@@ -142,17 +137,13 @@ jobs:
142137
potential_infra_failure=$(cat $DIR/err.log | grep -Eqiw "device" && echo true || echo false)
143138
echo "potential_infra_failure=$potential_infra_failure" >> "$GITHUB_OUTPUT"
144139
145-
if docker exec nemo_container_${{ github.run_id }} coverage xml; then
146-
coverage_report=coverage-${{ steps.create.outputs.coverage-prefix }}-${{ github.run_id }}-$(uuidgen)
147-
echo "coverage_report=$coverage_report" >> "$GITHUB_OUTPUT"
140+
docker exec nemo_container_${{ github.run_id }} coverage combine
141+
docker exec nemo_container_${{ github.run_id }} coverage xml
142+
docker cp nemo_container_${{ github.run_id }}:/workspace/.coverage $DIR/.coverage
143+
docker cp nemo_container_${{ github.run_id }}:/workspace/coverage.xml $DIR/coverage.xml
148144
149-
docker cp nemo_container_${{ github.run_id }}:/workspace/.coverage $DIR/.coverage
150-
docker cp nemo_container_${{ github.run_id }}:/workspace/coverage.xml $DIR/coverage.xml
151-
else
152-
coverage_report="none"
153-
echo "coverage_report=$coverage_report" >> "$GITHUB_OUTPUT"
154-
155-
fi
145+
coverage_report=coverage-${{ steps.create.outputs.coverage-prefix }}-${{ github.run_id }}-$(uuidgen)
146+
echo "coverage_report=$coverage_report" >> "$GITHUB_OUTPUT"
156147
157148
IS_SUCCESS=$(tail -n 1 $DIR/err.log | grep -q "Finished successfully." && echo "true" || echo "false")
158149
@@ -168,6 +159,11 @@ jobs:
168159
169160
exit $EXIT_CODE
170161
162+
- name: Test coverage
163+
shell: bash -x -e -u -o pipefail {0}
164+
run: |
165+
docker exec -t nemo_container_${{ github.run_id }} coverage report -i
166+
171167
- name: Upload artifacts
172168
uses: actions/upload-artifact@v4
173169
if: ${{ steps.check.outputs.coverage_report != 'none' }}

0 commit comments

Comments
 (0)