44 push :
55 branches :
66 - main
7- - ' release/**'
7+ - " release/**"
88 - develop
99 paths :
10- - ' ads/**'
10+ - " ads/**"
1111 - setup.py
12- - ' **requirements.txt'
13- - ' !docs/**'
12+ - " **requirements.txt"
13+ - " !docs/**"
1414
1515 pull_request :
1616
@@ -88,22 +88,21 @@ jobs:
8888 shell : bash
8989 run : |
9090 set -x # print commands that are executed
91-
91+
9292 sudo apt-get install libkrb5-dev graphviz
9393 $CONDA/bin/conda init
9494 source /home/runner/.bashrc
95-
95+
9696 pip install -r dev-requirements.txt
9797
9898 - name : " Run unitary tests folder with maximum ADS dependencies"
9999 timeout-minutes : 60
100100 shell : bash
101101 env :
102- NB_SESSION_COMPARTMENT_OCID : ocid1.compartment.oc1.<unique_ocid>
103102 CONDA_PREFIX : /usr/share/miniconda
104103 run : |
105104 set -x # print commands that are executed
106-
105+
107106 # Setup project and tests folder for cov reports to not be overwritten by another parallel step
108107 if [[ ! -z "${{ matrix.cov-reports }}" ]]; then
109108 mkdir -p cov-${{ matrix.name }}
@@ -112,7 +111,7 @@ jobs:
112111 ln -s ../ads ads
113112 ln -s ../.coveragerc .coveragerc
114113 fi
115-
114+
116115 # Run tests
117116 python -m pytest -v -p no:warnings --durations=5 \
118117 -n auto --dist loadfile ${{ matrix.cov-reports }} \
@@ -148,18 +147,18 @@ jobs:
148147 - name : " Calculate overall coverage"
149148 run : |
150149 set -x # print commands that are executed
151-
150+
152151 # Prepare default cov body text
153152 COV_BODY_INTRO="📌 Overall coverage:\n\n"
154153 echo COV_BODY="$COV_BODY_INTRO No success to gather report. 😿" >> $GITHUB_ENV
155-
154+
156155 # Combine coverage files
157156 pip install coverage
158157 coverage combine cov-reports-unitary/.coverage cov-reports-model/.coverage
159-
158+
160159 # Make html report
161160 coverage html
162-
161+
163162 # Calculate overall coverage and update body message
164163 COV=$(grep -E 'pc_cov' htmlcov/index.html | cut -d'>' -f 2 | cut -d'%' -f 1)
165164 if [[ ! -z $COV ]]; then
@@ -171,18 +170,18 @@ jobs:
171170 if : always()
172171 run : |
173172 set -x # print commands that are executed
174-
173+
175174 # Prepare default diff body text
176175 DIFF_BODY_INTRO="📌 Cov diff with **${{ env.COMPARE_BRANCH }}**:\n\n"
177176 echo DIFF_BODY="$BODY_INTRO No success to gather report. 😿" >> $GITHUB_ENV
178-
177+
179178 # Prepare file paths to coverage xml files
180179 # Filenames taken from job.test last step with name - "Save coverage files"
181180 FILE1="cov-reports-unitary/coverage.xml"; [[ ! -f $FILE1 ]] && FILE1=""
182181 FILE2="cov-reports-model/coverage.xml"; [[ ! -f $FILE2 ]] && FILE2=""
183182 echo "FILE1=$FILE1" >> $GITHUB_ENV
184183 echo "FILE2=$FILE2" >> $GITHUB_ENV
185-
184+
186185 # Calculate coverage diff and update body message
187186 pip install diff_cover
188187 diff-cover $FILE1 $FILE2 --compare-branch=origin/${{ env.COMPARE_BRANCH }}
0 commit comments