Skip to content

Commit

Permalink
Update deploy_test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Garima Ketan Chauhan authored and GitHub Enterprise committed Apr 2, 2025
1 parent f028d93 commit a7e8190
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/deploy_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,17 @@ jobs:
- name: Set up test containers
run: docker-compose -f docker-compose.stag.yml up --build -d

- name: Run backend unit tests
run: docker exec secfit_stag_backend python manage.py test tests
- name: Run backend unit tests with coverage
run: |
docker exec secfit_stag_backend coverage run --source=. manage.py test tests
docker exec secfit_stag_backend coverage html
docker cp secfit_stag_backend:/app/htmlcov . # Copy coverage HTML to host
- name: Archive coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: ./htmlcov

- name: Tear down test containers
run: docker-compose -f docker-compose.stag.yml down
Expand Down

0 comments on commit a7e8190

Please sign in to comment.