forked from mathialm/secfit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Garima Ketan Chauhan
authored and
GitHub Enterprise
committed
Apr 2, 2025
1 parent
f180a13
commit 24f9e84
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Django Coverage Report | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - gargi-production # Or any other branch you want to run coverage on | ||
| pull_request: # Also run on pull requests | ||
| branches: | ||
| - gargi-production | ||
|
|
||
| jobs: | ||
| coverage: | ||
| runs-on: self-hosted | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Build test image | ||
| run: docker build -f Dockerfile.test -t django-test-coverage-image . | ||
|
|
||
| - name: Run Django tests with coverage | ||
| run: docker run django-test-coverage-image | ||
|
|
||
| - name: Copy .coverage file | ||
| run: docker cp $(docker ps -aqf "ancestor=django-test-coverage-image"):/app/.coverage . | ||
|
|
||
| - name: Generate HTML coverage report | ||
| run: coverage html | ||
|
|
||
| - name: Upload HTML coverage report | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: coverage-report | ||
| path: htmlcov/ |