@@ -126,19 +126,10 @@ jobs:
126126 PYTHONPATH : ${{ env.SHARED_PATH }}
127127 continue-on-error : true
128128 run : |
129- echo "shared coverage - Current directory: $(pwd)"
130129 poetry env use 3.11
131130 poetry install
132131 poetry run coverage run --source=src -m unittest discover -s tests -p "test_*.py" -v || echo "shared tests failed" >> ../../failed_tests.txt
133132 poetry run coverage xml -o ../../shared-coverage.xml
134- ls ../../shared-coverage.xml
135- # show director of ../.. as absolute path
136- echo "Parent directory of shared-coverage.xml: $(pwd)/../../"
137- #check files created
138- if [ ! -f ../../shared-coverage.xml ]; then
139- echo "shared-coverage.xml not found"
140- fi
141- cat ../../shared-coverage.xml
142133
143134 - name : Run unittest with id_sync
144135 working-directory : lambdas/id_sync
@@ -147,26 +138,14 @@ jobs:
147138 PYTHONPATH : ${{ env.LAMBDA_PATH }}/id_sync/src:${{ env.LAMBDA_PATH }}/id_sync/tests:${{ env.SHARED_PATH }}
148139 continue-on-error : true
149140 run : |
150- echo "id_sync coverage - Current directory: $(pwd)"
151141 poetry env use 3.11
152142 poetry install
153143 poetry run coverage run -m unittest discover || echo "id_sync tests failed" >> ../../failed_tests.txt
154144 poetry run coverage xml -o ../../id_sync-coverage.xml
155- #check files created
156- if [ ! -f ../../id_sync-coverage.xml ]; then
157- echo "id_sync-coverage.xml not found, exiting with error"
158- fi
159- cat ../../id_sync-coverage.xml
160145
161146 - name : Run Test Failure Summary
162147 id : check_failure
163148 run : |
164- # list all coverage xml files
165- echo "Coverage XML files:"
166- find . -name "*.xml" -print
167- echo "Review shared-coverage.xml for shared coverage"
168- cat shared-coverage.xml
169- # Check if failed_tests.txt exists and is not empty
170149 if [ -s failed_tests.txt ]; then
171150 echo "The following tests failed:"
172151 cat failed_tests.txt
0 commit comments