2929
3030 - name : Install Backend Dependencies
3131 run : |
32- python -m pip install -r requirements.txt
32+ python -m pip install -r src/ requirements.txt
3333 python -m pip install coverage pytest-cov
3434 python -m pip install azure-keyvault-secrets
3535
@@ -79,21 +79,21 @@ jobs:
7979 ${{ runner.os }}-node-
8080
8181 - name : Navigate to frontend directory
82- run : cd frontend
82+ run : cd src/ frontend
8383
8484 - name : Install Frontend Dependencies
8585 run : |
86- cd frontend # Change to the frontend directory
86+ cd src/ frontend # Change to the frontend directory
8787 npm install # Install dependencies from frontend/package.json
8888
8989 - name : Run Frontend Tests with Coverage
9090 run : |
91- cd frontend # Change to the frontend directory
91+ cd src/ frontend # Change to the frontend directory
9292 if npm run test -- --coverage; then
9393 echo "Tests completed, checking coverage."
9494 # Check coverage report and ensure it meets threshold
95- if [ -f frontend/coverage/lcov-report/index.html ]; then
96- COVERAGE=$(cat frontend/coverage/lcov-report/index.html | grep -oP 'total: \K[0-9]+(\.[0-9]+)?')
95+ if [ -f src/ frontend/coverage/lcov-report/index.html ]; then
96+ COVERAGE=$(cat src/ frontend/coverage/lcov-report/index.html | grep -oP 'total: \K[0-9]+(\.[0-9]+)?')
9797 if (( $(echo "$COVERAGE < 80" | bc -l) )); then
9898 echo "Coverage is below 80%, failing the job."
9999 exit 1
@@ -107,5 +107,5 @@ jobs:
107107 with :
108108 name : frontend-coverage
109109 path : |
110- frontend/coverage/ # Correct path to frontend coverage
111- frontend/coverage/lcov-report/ # Correct path to frontend lcov report
110+ src/ frontend/coverage/ # Correct path to frontend coverage
111+ src/ frontend/coverage/lcov-report/ # Correct path to frontend lcov report
0 commit comments