Skip to content

Commit

Permalink
Update coverage-workflow.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 c2b5e4f commit f03612f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/coverage-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Change working directory
run: cd backend/

- name: Build test image
run: docker build -f tests/Dockerfile.test -t django-test-coverage-image .
working-directory: backend/

- name: Run Django tests with coverage
run: docker run django-test-coverage-image
working-directory: backend/

- name: Copy .coverage file
run: docker cp $(docker ps -aqf "ancestor=django-test-coverage-image"):/app/.coverage .
working-directory: backend/

- name: Generate HTML coverage report
run: coverage html
working-directory: backend/

- name: Upload HTML coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: htmlcov/
path: backend/htmlcov/ # Adjusted path

0 comments on commit f03612f

Please sign in to comment.